Page MenuHomeWildfire Games

Also account for elevation for melee units.
Changes PlannedPublic

Authored by Freagarach on Aug 8 2019, 12:46 PM.

Details

Reviewers
Silier
Summary

This adds a debonus to the range of melee units when standing higher or lower.
Not sure whether anyone would like this in or not, but it works and is realistic.
(Probably no one wants it in: it gives no noticable difference in attack range and when it would be, players might not understand where the difference comes from. But since I already uploaded the patch earlier, I'll keep it open. Feel free to close as won't be in, as appropriate.)

Test Plan

Verify that melee units can still attack eachother and that they have to get a tad closer to actually attack when standing higher or lower than their targets.

Event Timeline

Freagarach created this revision.Aug 8 2019, 12:46 PM
Freagarach created this object with visibility "No One".
Freagarach updated this revision to Diff 9678.Sep 9 2019, 3:22 PM
Freagarach edited the summary of this revision. (Show Details)

Fixed test.

Freagarach edited the summary of this revision. (Show Details)
Freagarach edited the test plan for this revision. (Show Details)
Freagarach changed the visibility from "No One" to "Public (No Login Required)".

Updated test to use code style update (, at end of object property list spanning multiple lines).

Freagarach edited the summary of this revision. (Show Details)Dec 21 2019, 12:01 PM

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 328| »   »   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
| 337| »   »   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
| 767| 767| 					this.FinishOrder();
| 768| 768| 					return;
| 769| 769| 				}
| 770|    |-				else
| 771|    |-				{
|    | 770|+				
| 772| 771| 					this.SetNextState("GARRISON.APPROACHING");
| 773| 772| 					return;
| 774|    |-				}
|    | 773|+				
| 775| 774| 			}
| 776| 775| 
| 777| 776| 			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
|1035|1035| 			},
|1036|1036| 		},
|1037|1037| 
|1038|    |-		"GARRISON":{
|    |1038|+		"GARRISON": {
|1039|1039| 			"APPROACHING": {
|1040|1040| 				"enter": function() {
|1041|1041| 					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
|2000|2000| 
|2001|2001| 				"Attacked": function(msg) {
|2002|2002| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2003|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2004|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2003|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2004|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2005|2005| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2006|2006| 				},
|2007|2007| 			},
|    | [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
|2728|2728| 					{
|2729|2729| 						// The building was already finished/fully repaired before we arrived;
|2730|2730| 						// let the ConstructionFinished handler handle this.
|2731|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2731|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2732|2732| 						return true;
|2733|2733| 					}
|2734|2734| 
|    | [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
|2728|2728| 					{
|2729|2729| 						// The building was already finished/fully repaired before we arrived;
|2730|2730| 						// let the ConstructionFinished handler handle this.
|2731|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2731|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2732|2732| 						return true;
|2733|2733| 					}
|2734|2734| 
|    | [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
|3242|3242| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3243|3243| 
|3244|3244| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3245|    |-							// only used for domestic animals
|    |3245|+		// only used for domestic animals
|3246|3246| 	},
|3247|3247| };
|3248|3248| 
|    | [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
|3299|3299| 
|3300|3300| UnitAI.prototype.IsAnimal = function()
|3301|3301| {
|3302|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3302|+	return (!!this.template.NaturalBehaviour);
|3303|3303| };
|3304|3304| 
|3305|3305| 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
|3415|3415| 		{
|3416|3416| 			let index = this.GetCurrentState().indexOf(".");
|3417|3417| 			if (index != -1)
|3418|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3418|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3419|3419| 			this.Stop(false);
|3420|3420| 		}
|3421|3421| 
|    | [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
|3471|3471| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3472|3472| 			continue;
|3473|3473| 		if (i == 0)
|3474|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3474|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3475|3475| 		else
|3476|3476| 			this.orderQueue.splice(i, 1);
|3477|3477| 		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
|3471|3471| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3472|3472| 			continue;
|3473|3473| 		if (i == 0)
|3474|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3474|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3475|3475| 		else
|3476|3476| 			this.orderQueue.splice(i, 1);
|3477|3477| 		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
|3555|3555| };
|3556|3556| 
|3557|3557| 
|3558|    |-//// FSM linkage functions ////
|    |3558|+// // FSM linkage functions ////
|3559|3559| 
|3560|3560| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3561|3561| 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
|3725|3725| 				continue;
|3726|3726| 			if (this.orderQueue[i].type == type)
|3727|3727| 				continue;
|3728|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3728|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3729|3729| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3730|3730| 			return;
|3731|3731| 		}
|    | [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
|3725|3725| 				continue;
|3726|3726| 			if (this.orderQueue[i].type == type)
|3727|3727| 				continue;
|3728|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3728|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3729|3729| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3730|3730| 			return;
|3731|3731| 		}
|    | [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
|3896|3896| 	if (data.timerRepeat === undefined)
|3897|3897| 		this.timer = undefined;
|3898|3898| 
|3899|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3899|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3900|3900| };
|3901|3901| 
|3902|3902| /**
|    | [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
|3896|3896| 	if (data.timerRepeat === undefined)
|3897|3897| 		this.timer = undefined;
|3898|3898| 
|3899|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3899|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3900|3900| };
|3901|3901| 
|3902|3902| /**
|    | [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
|3941|3941| 	// TODO: This is a bit inefficient since every unit listens to every
|3942|3942| 	// construction message - ideally we could scope it to only the one we're building
|3943|3943| 
|3944|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3944|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|3945|3945| };
|3946|3946| 
|3947|3947| 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
|3941|3941| 	// TODO: This is a bit inefficient since every unit listens to every
|3942|3942| 	// construction message - ideally we could scope it to only the one we're building
|3943|3943| 
|3944|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3944|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|3945|3945| };
|3946|3946| 
|3947|3947| 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
|3966|3966| 
|3967|3967| UnitAI.prototype.OnAttacked = function(msg)
|3968|3968| {
|3969|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3969|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|3970|3970| };
|3971|3971| 
|3972|3972| 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
|3966|3966| 
|3967|3967| UnitAI.prototype.OnAttacked = function(msg)
|3968|3968| {
|3969|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3969|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|3970|3970| };
|3971|3971| 
|3972|3972| 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
|3971|3971| 
|3972|3972| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3973|3973| {
|3974|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3974|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|3975|3975| };
|3976|3976| 
|3977|3977| 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
|3971|3971| 
|3972|3972| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3973|3973| {
|3974|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3974|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|3975|3975| };
|3976|3976| 
|3977|3977| 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
|3976|3976| 
|3977|3977| UnitAI.prototype.OnHealthChanged = function(msg)
|3978|3978| {
|3979|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3979|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|3980|3980| };
|3981|3981| 
|3982|3982| 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
|3976|3976| 
|3977|3977| UnitAI.prototype.OnHealthChanged = function(msg)
|3978|3978| {
|3979|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3979|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|3980|3980| };
|3981|3981| 
|3982|3982| 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
|3982|3982| UnitAI.prototype.OnRangeUpdate = function(msg)
|3983|3983| {
|3984|3984| 	if (msg.tag == this.losRangeQuery)
|3985|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3985|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|3986|3986| 	else if (msg.tag == this.losHealRangeQuery)
|3987|3987| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3988|3988| };
|    | [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
|3982|3982| UnitAI.prototype.OnRangeUpdate = function(msg)
|3983|3983| {
|3984|3984| 	if (msg.tag == this.losRangeQuery)
|3985|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3985|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|3986|3986| 	else if (msg.tag == this.losHealRangeQuery)
|3987|3987| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3988|3988| };
|    | [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
|3984|3984| 	if (msg.tag == this.losRangeQuery)
|3985|3985| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3986|3986| 	else if (msg.tag == this.losHealRangeQuery)
|3987|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3987|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|3988|3988| };
|3989|3989| 
|3990|3990| 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
|3984|3984| 	if (msg.tag == this.losRangeQuery)
|3985|3985| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3986|3986| 	else if (msg.tag == this.losHealRangeQuery)
|3987|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3987|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|3988|3988| };
|3989|3989| 
|3990|3990| 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
|3989|3989| 
|3990|3990| UnitAI.prototype.OnPackFinished = function(msg)
|3991|3991| {
|3992|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3992|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|3993|3993| };
|3994|3994| 
|3995|3995| //// 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
|3989|3989| 
|3990|3990| UnitAI.prototype.OnPackFinished = function(msg)
|3991|3991| {
|3992|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3992|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|3993|3993| };
|3994|3994| 
|3995|3995| //// 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
|3992|3992| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|3993|3993| };
|3994|3994| 
|3995|    |-//// Helper functions to be called by the FSM ////
|    |3995|+// // Helper functions to be called by the FSM ////
|3996|3996| 
|3997|3997| UnitAI.prototype.GetWalkSpeed = function()
|3998|3998| {
|    | [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
|4662|4662| UnitAI.prototype.AttackEntityInZone = function(ents)
|4663|4663| {
|4664|4664| 	var target = ents.find(target =>
|4665|    |-		this.CanAttack(target)
|4666|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4665|+		this.CanAttack(target) &&
|    |4666|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4667|4667| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4668|4668| 	);
|4669|4669| 	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
|4663|4663| {
|4664|4664| 	var target = ents.find(target =>
|4665|4665| 		this.CanAttack(target)
|4666|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4667|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4666|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4667|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4668|4668| 	);
|4669|4669| 	if (!target)
|4670|4670| 		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
|4727|4727| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4728|4728| 	if (this.isGuardOf)
|4729|4729| 	{
|4730|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4730|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4731|4731| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4732|4732| 		if (cmpUnitAI && cmpAttack &&
|4733|4733| 		    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
|4731|4731| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4732|4732| 		if (cmpUnitAI && cmpAttack &&
|4733|4733| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4734|    |-				return false;
|    |4734|+			return false;
|4735|4735| 	}
|4736|4736| 
|4737|4737| 	// 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
|4769|4769| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4770|4770| 	if (this.isGuardOf)
|4771|4771| 	{
|4772|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4772|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4773|4773| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4774|4774| 		if (cmpUnitAI && cmpAttack &&
|4775|4775| 		    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
|4782|4782| 	return false;
|4783|4783| };
|4784|4784| 
|4785|    |-//// External interface functions ////
|    |4785|+// // External interface functions ////
|4786|4786| 
|4787|4787| UnitAI.prototype.SetFormationController = function(ent)
|4788|4788| {
|    | [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
|4938|4938| 	{
|4939|4939| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4940|4940| 			return;
|4941|    |-		else
|4942|    |-			this.RemoveGuard();
|    |4941|+		this.RemoveGuard();
|4943|4942| 	}
|4944|4943| 
|4945|4944| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [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
|5270|5270| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5271|5271| 	{
|5272|5272| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5273|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5273|+		if (cmpTrader.HasBothMarkets() &&
|5274|5274| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5275|5275| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5276|5276| 		{
|    | [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
|5551|5551| 				{
|5552|5552| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5553|5553| 					var targetClasses = this.order.data.targetClasses;
|5554|    |-					if (targetClasses.attack && cmpIdentity
|5555|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5554|+					if (targetClasses.attack && cmpIdentity &&
|    |5555|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5556|5556| 						continue;
|5557|5557| 					if (targetClasses.avoid && cmpIdentity
|5558|5558| 						&& 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
|5554|5554| 					if (targetClasses.attack && cmpIdentity
|5555|5555| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5556|5556| 						continue;
|5557|    |-					if (targetClasses.avoid && cmpIdentity
|5558|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5557|+					if (targetClasses.avoid && cmpIdentity &&
|    |5558|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5559|5559| 						continue;
|5560|5560| 					// Only used by the AIs to prevent some choices of targets
|5561|5561| 					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
|5577|5577| 		{
|5578|5578| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5579|5579| 			var targetClasses = this.order.data.targetClasses;
|5580|    |-			if (cmpIdentity && targetClasses.attack
|5581|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5580|+			if (cmpIdentity && targetClasses.attack &&
|    |5581|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5582|5582| 				continue;
|5583|5583| 			if (cmpIdentity && targetClasses.avoid
|5584|5584| 				&& 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
|5580|5580| 			if (cmpIdentity && targetClasses.attack
|5581|5581| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5582|5582| 				continue;
|5583|    |-			if (cmpIdentity && targetClasses.avoid
|5584|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5583|+			if (cmpIdentity && targetClasses.avoid &&
|    |5584|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5585|5585| 				continue;
|5586|5586| 			// Only used by the AIs to prevent some choices of targets
|5587|5587| 			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
|5737|5737| 
|5738|5738| UnitAI.prototype.SetHeldPosition = function(x, z)
|5739|5739| {
|5740|    |-	this.heldPosition = {"x": x, "z": z};
|    |5740|+	this.heldPosition = { "x": x, "z": z};
|5741|5741| };
|5742|5742| 
|5743|5743| 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
|5737|5737| 
|5738|5738| UnitAI.prototype.SetHeldPosition = function(x, z)
|5739|5739| {
|5740|    |-	this.heldPosition = {"x": x, "z": z};
|    |5740|+	this.heldPosition = {"x": x, "z": z };
|5741|5741| };
|5742|5742| 
|5743|5743| 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
|5764|5764| 	return false;
|5765|5765| };
|5766|5766| 
|5767|    |-//// Helper functions ////
|    |5767|+// // Helper functions ////
|5768|5768| 
|5769|5769| UnitAI.prototype.CanAttack = function(target)
|5770|5770| {
|    | [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
|5968|5968| 	return cmpPack && cmpPack.IsPacking();
|5969|5969| };
|5970|5970| 
|5971|    |-//// Formation specific functions ////
|    |5971|+// // Formation specific functions ////
|5972|5972| 
|5973|5973| UnitAI.prototype.IsAttackingAsFormation = function()
|5974|5974| {
|    | [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
|5973|5973| UnitAI.prototype.IsAttackingAsFormation = function()
|5974|5974| {
|5975|5975| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|5976|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|5977|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |5976|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |5977|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5978|5978| };
|5979|5979| 
|5980|5980| //// 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
|5977|5977| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5978|5978| };
|5979|5979| 
|5980|    |-//// Animal specific functions ////
|    |5980|+// // Animal specific functions ////
|5981|5981| 
|5982|5982| UnitAI.prototype.MoveRandomly = function(distance)
|5983|5983| {

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

binaries/data/mods/public/simulation/components/UnitAI.js
| 922| »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
| 947| »   »   »   "enter":·function(msg)·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

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

binaries/data/mods/public/simulation/components/UnitAI.js
|1040| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1085| »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1117| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1277| »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1344| »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1536| »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1558| »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1590| »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1744| »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1794| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1872| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|2049| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|2165| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|2440| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|2473| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|2579| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|2645| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|2684| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|2884| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|3077| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|3801| »   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
|4649| »   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
|4664| »   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
|4710| »   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
|4733| »   »   ····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
|2004| »   »   »   »   »   »   &&·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
|3763| »   »   var·order·=·{·"type":·type,·"data":·data·};
|    | [NORMAL] JSHintBear:
|    | 'order' is already defined.

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|5581| »   »   »   »   &&·!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
|5584| »   »   »   »   &&·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
|5659| »   »   var·cmpVision·=·Engine.QueryInterface(this.entity,·IID_Vision);
|    | [NORMAL] JSHintBear:
|    | 'cmpVision' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5662| »   »   var·range·=·cmpVision.GetRange();
|    | [NORMAL] JSHintBear:
|    | 'range' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5667| »   »   var·cmpRanged·=·Engine.QueryInterface(this.entity,·iid);
|    | [NORMAL] JSHintBear:
|    | 'cmpRanged' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5670| »   »   var·range·=·iid·!==·IID_Attack·?·cmpRanged.GetRange()·:·cmpRanged.GetFullAttackRange();
|    | [NORMAL] JSHintBear:
|    | 'range' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5671| »   »   var·cmpVision·=·Engine.QueryInterface(this.entity,·IID_Vision);
|    | [NORMAL] JSHintBear:
|    | 'cmpVision' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5681| »   »   var·cmpVision·=·Engine.QueryInterface(this.entity,·IID_Vision);
|    | [NORMAL] JSHintBear:
|    | 'cmpVision' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5684| »   »   var·range·=·cmpVision.GetRange();
|    | [NORMAL] JSHintBear:
|    | 'range' is already defined.

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

Stan added a subscriber: Stan.Dec 21 2019, 12:23 PM
Stan added inline comments.
binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
317

Missing spaces?

Nescio added a subscriber: Nescio.Dec 21 2019, 1:21 PM

Is “debonus” a decrease or a bonus (or a typo)?
It might become useful in the future for a fantasy mod with flying melee units (e.g. pegasi) or perhaps for pikemen on walls (right now they can't attack).

Freagarach updated this revision to Diff 11445.Feb 29 2020, 2:03 PM
Freagarach marked an inline comment as done.

Fix spaces.

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

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

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

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

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

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 331| »   »   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
| 340| »   »   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
| 788| 788| 					this.FinishOrder();
| 789| 789| 					return;
| 790| 790| 				}
| 791|    |-				else
| 792|    |-				{
|    | 791|+				
| 793| 792| 					this.SetNextState("GARRISON.APPROACHING");
| 794| 793| 					return;
| 795|    |-				}
|    | 794|+				
| 796| 795| 			}
| 797| 796| 
| 798| 797| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'GARRISON'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1060|1060| 			},
|1061|1061| 		},
|1062|1062| 
|1063|    |-		"GARRISON":{
|    |1063|+		"GARRISON": {
|1064|1064| 			"APPROACHING": {
|1065|1065| 				"enter": function() {
|1066|1066| 					if (!this.MoveToGarrisonRange(this.order.data.target))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2038|2038| 
|2039|2039| 				"Attacked": function(msg) {
|2040|2040| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2041|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2042|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2041|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2042|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2043|2043| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2044|2044| 				},
|2045|2045| 			},
|    | [NORMAL] ESLintBear (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
|2776|2776| 					{
|2777|2777| 						// The building was already finished/fully repaired before we arrived;
|2778|2778| 						// let the ConstructionFinished handler handle this.
|2779|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2779|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2780|2780| 						return true;
|2781|2781| 					}
|2782|2782| 
|    | [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
|2776|2776| 					{
|2777|2777| 						// The building was already finished/fully repaired before we arrived;
|2778|2778| 						// let the ConstructionFinished handler handle this.
|2779|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2779|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2780|2780| 						return true;
|2781|2781| 					}
|2782|2782| 
|    | [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
|3074|3074| 				this.StopTimer();
|3075|3075| 				this.ResetAnimation();
|3076|3076| 				if (this.formationAnimationVariant)
|3077|    |-					this.SetAnimationVariant(this.formationAnimationVariant)
|    |3077|+					this.SetAnimationVariant(this.formationAnimationVariant);
|3078|3078| 				else
|3079|3079| 					this.SetDefaultAnimationVariant();
|3080|3080| 				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
|3300|3300| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3301|3301| 
|3302|3302| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3303|    |-							// only used for domestic animals
|    |3303|+		// only used for domestic animals
|3304|3304| 
|3305|3305| 		// Reuse the same garrison behaviour for animals.
|3306|3306| 		"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
|3362|3362| 
|3363|3363| UnitAI.prototype.IsAnimal = function()
|3364|3364| {
|3365|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3365|+	return (!!this.template.NaturalBehaviour);
|3366|3366| };
|3367|3367| 
|3368|3368| 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
|3478|3478| 		{
|3479|3479| 			let index = this.GetCurrentState().indexOf(".");
|3480|3480| 			if (index != -1)
|3481|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3481|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3482|3482| 			this.Stop(false);
|3483|3483| 		}
|3484|3484| 
|    | [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
|3534|3534| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3535|3535| 			continue;
|3536|3536| 		if (i == 0)
|3537|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3537|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3538|3538| 		else
|3539|3539| 			this.orderQueue.splice(i, 1);
|3540|3540| 		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
|3534|3534| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3535|3535| 			continue;
|3536|3536| 		if (i == 0)
|3537|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3537|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3538|3538| 		else
|3539|3539| 			this.orderQueue.splice(i, 1);
|3540|3540| 		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
|3621|3621| };
|3622|3622| 
|3623|3623| 
|3624|    |-//// FSM linkage functions ////
|    |3624|+// // FSM linkage functions ////
|3625|3625| 
|3626|3626| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3627|3627| 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
|3792|3792| 				continue;
|3793|3793| 			if (this.orderQueue[i].type == type)
|3794|3794| 				continue;
|3795|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3795|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3796|3796| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3797|3797| 			return;
|3798|3798| 		}
|    | [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
|3792|3792| 				continue;
|3793|3793| 			if (this.orderQueue[i].type == type)
|3794|3794| 				continue;
|3795|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3795|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3796|3796| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3797|3797| 			return;
|3798|3798| 		}
|    | [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
|4034|4034| 	if (data.timerRepeat === undefined)
|4035|4035| 		this.timer = undefined;
|4036|4036| 
|4037|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4037|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|4038|4038| };
|4039|4039| 
|4040|4040| /**
|    | [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
|4034|4034| 	if (data.timerRepeat === undefined)
|4035|4035| 		this.timer = undefined;
|4036|4036| 
|4037|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4037|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|4038|4038| };
|4039|4039| 
|4040|4040| /**
|    | [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
|4079|4079| 	// TODO: This is a bit inefficient since every unit listens to every
|4080|4080| 	// construction message - ideally we could scope it to only the one we're building
|4081|4081| 
|4082|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4082|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|4083|4083| };
|4084|4084| 
|4085|4085| 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
|4079|4079| 	// TODO: This is a bit inefficient since every unit listens to every
|4080|4080| 	// construction message - ideally we could scope it to only the one we're building
|4081|4081| 
|4082|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4082|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|4083|4083| };
|4084|4084| 
|4085|4085| 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
|4110|4110| 	if (msg.fromStatusEffect)
|4111|4111| 		return;
|4112|4112| 
|4113|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4113|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|4114|4114| };
|4115|4115| 
|4116|4116| 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
|4110|4110| 	if (msg.fromStatusEffect)
|4111|4111| 		return;
|4112|4112| 
|4113|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4113|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|4114|4114| };
|4115|4115| 
|4116|4116| 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
|4115|4115| 
|4116|4116| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4117|4117| {
|4118|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4118|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|4119|4119| };
|4120|4120| 
|4121|4121| 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
|4115|4115| 
|4116|4116| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4117|4117| {
|4118|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4118|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|4119|4119| };
|4120|4120| 
|4121|4121| 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
|4120|4120| 
|4121|4121| UnitAI.prototype.OnHealthChanged = function(msg)
|4122|4122| {
|4123|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4123|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4124|4124| };
|4125|4125| 
|4126|4126| 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
|4120|4120| 
|4121|4121| UnitAI.prototype.OnHealthChanged = function(msg)
|4122|4122| {
|4123|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4123|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4124|4124| };
|4125|4125| 
|4126|4126| 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
|4126|4126| UnitAI.prototype.OnRangeUpdate = function(msg)
|4127|4127| {
|4128|4128| 	if (msg.tag == this.losRangeQuery)
|4129|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4129|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|4130|4130| 	else if (msg.tag == this.losHealRangeQuery)
|4131|4131| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4132|4132| };
|    | [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
|4126|4126| UnitAI.prototype.OnRangeUpdate = function(msg)
|4127|4127| {
|4128|4128| 	if (msg.tag == this.losRangeQuery)
|4129|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4129|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|4130|4130| 	else if (msg.tag == this.losHealRangeQuery)
|4131|4131| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4132|4132| };
|    | [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
|4128|4128| 	if (msg.tag == this.losRangeQuery)
|4129|4129| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4130|4130| 	else if (msg.tag == this.losHealRangeQuery)
|4131|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4131|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|4132|4132| };
|4133|4133| 
|4134|4134| 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
|4128|4128| 	if (msg.tag == this.losRangeQuery)
|4129|4129| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4130|4130| 	else if (msg.tag == this.losHealRangeQuery)
|4131|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4131|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|4132|4132| };
|4133|4133| 
|4134|4134| 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
|4133|4133| 
|4134|4134| UnitAI.prototype.OnPackFinished = function(msg)
|4135|4135| {
|4136|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4136|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4137|4137| };
|4138|4138| 
|4139|4139| //// 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
|4133|4133| 
|4134|4134| UnitAI.prototype.OnPackFinished = function(msg)
|4135|4135| {
|4136|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4136|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4137|4137| };
|4138|4138| 
|4139|4139| //// 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
|4136|4136| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4137|4137| };
|4138|4138| 
|4139|    |-//// Helper functions to be called by the FSM ////
|    |4139|+// // Helper functions to be called by the FSM ////
|4140|4140| 
|4141|4141| UnitAI.prototype.GetWalkSpeed = function()
|4142|4142| {
|    | [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
|4804|4804| UnitAI.prototype.AttackEntityInZone = function(ents)
|4805|4805| {
|4806|4806| 	var target = ents.find(target =>
|4807|    |-		this.CanAttack(target)
|4808|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4807|+		this.CanAttack(target) &&
|    |4808|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4809|4809| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4810|4810| 	);
|4811|4811| 	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
|4805|4805| {
|4806|4806| 	var target = ents.find(target =>
|4807|4807| 		this.CanAttack(target)
|4808|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4809|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4808|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4809|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4810|4810| 	);
|4811|4811| 	if (!target)
|4812|4812| 		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
|4869|4869| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4870|4870| 	if (this.isGuardOf)
|4871|4871| 	{
|4872|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4872|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4873|4873| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4874|4874| 		if (cmpUnitAI && cmpAttack &&
|4875|4875| 		    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
|4873|4873| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4874|4874| 		if (cmpUnitAI && cmpAttack &&
|4875|4875| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4876|    |-				return false;
|    |4876|+			return false;
|4877|4877| 	}
|4878|4878| 
|4879|4879| 	// 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
|4911|4911| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4912|4912| 	if (this.isGuardOf)
|4913|4913| 	{
|4914|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4914|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4915|4915| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4916|4916| 		if (cmpUnitAI && cmpAttack &&
|4917|4917| 		    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
|4924|4924| 	return false;
|4925|4925| };
|4926|4926| 
|4927|    |-//// External interface functions ////
|    |4927|+// // External interface functions ////
|4928|4928| 
|4929|4929| UnitAI.prototype.SetFormationController = function(ent)
|4930|4930| {
|    | [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
|5080|5080| 	{
|5081|5081| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5082|5082| 			return;
|5083|    |-		else
|5084|    |-			this.RemoveGuard();
|    |5083|+		this.RemoveGuard();
|5085|5084| 	}
|5086|5085| 
|5087|5086| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [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
|5422|5422| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5423|5423| 	{
|5424|5424| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5425|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5425|+		if (cmpTrader.HasBothMarkets() &&
|5426|5426| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5427|5427| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5428|5428| 		{
|    | [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
|5703|5703| 				{
|5704|5704| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5705|5705| 					var targetClasses = this.order.data.targetClasses;
|5706|    |-					if (targetClasses.attack && cmpIdentity
|5707|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5706|+					if (targetClasses.attack && cmpIdentity &&
|    |5707|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5708|5708| 						continue;
|5709|5709| 					if (targetClasses.avoid && cmpIdentity
|5710|5710| 						&& 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
|5706|5706| 					if (targetClasses.attack && cmpIdentity
|5707|5707| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5708|5708| 						continue;
|5709|    |-					if (targetClasses.avoid && cmpIdentity
|5710|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5709|+					if (targetClasses.avoid && cmpIdentity &&
|    |5710|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5711|5711| 						continue;
|5712|5712| 					// Only used by the AIs to prevent some choices of targets
|5713|5713| 					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
|5729|5729| 		{
|5730|5730| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5731|5731| 			var targetClasses = this.order.data.targetClasses;
|5732|    |-			if (cmpIdentity && targetClasses.attack
|5733|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5732|+			if (cmpIdentity && targetClasses.attack &&
|    |5733|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5734|5734| 				continue;
|5735|5735| 			if (cmpIdentity && targetClasses.avoid
|5736|5736| 				&& 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
|5732|5732| 			if (cmpIdentity && targetClasses.attack
|5733|5733| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5734|5734| 				continue;
|5735|    |-			if (cmpIdentity && targetClasses.avoid
|5736|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5735|+			if (cmpIdentity && targetClasses.avoid &&
|    |5736|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5737|5737| 				continue;
|5738|5738| 			// Only used by the AIs to prevent some choices of targets
|5739|5739| 			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
|5875|5875| 
|5876|5876| UnitAI.prototype.SetHeldPosition = function(x, z)
|5877|5877| {
|5878|    |-	this.heldPosition = {"x": x, "z": z};
|    |5878|+	this.heldPosition = { "x": x, "z": z};
|5879|5879| };
|5880|5880| 
|5881|5881| 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
|5875|5875| 
|5876|5876| UnitAI.prototype.SetHeldPosition = function(x, z)
|5877|5877| {
|5878|    |-	this.heldPosition = {"x": x, "z": z};
|    |5878|+	this.heldPosition = {"x": x, "z": z };
|5879|5879| };
|5880|5880| 
|5881|5881| 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
|5902|5902| 	return false;
|5903|5903| };
|5904|5904| 
|5905|    |-//// Helper functions ////
|    |5905|+// // Helper functions ////
|5906|5906| 
|5907|5907| /**
|5908|5908|  * 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
|5921|5921| 		return undefined;
|5922|5922| 
|5923|5923| 	return component.GetRange(type);
|5924|    |-}
|    |5924|+};
|5925|5925| 
|5926|5926| UnitAI.prototype.CanAttack = function(target)
|5927|5927| {
|    | [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
|6119|6119| 	return cmpPack && cmpPack.IsPacking();
|6120|6120| };
|6121|6121| 
|6122|    |-//// Formation specific functions ////
|    |6122|+// // Formation specific functions ////
|6123|6123| 
|6124|6124| UnitAI.prototype.IsAttackingAsFormation = function()
|6125|6125| {
|    | [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
|6124|6124| UnitAI.prototype.IsAttackingAsFormation = function()
|6125|6125| {
|6126|6126| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6127|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6128|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6127|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6128|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6129|6129| };
|6130|6130| 
|6131|6131| //// 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
|6128|6128| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6129|6129| };
|6130|6130| 
|6131|    |-//// Animal specific functions ////
|    |6131|+// // Animal specific functions ////
|6132|6132| 
|6133|6133| UnitAI.prototype.MoveRandomly = function(distance)
|6134|6134| {

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

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

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

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

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

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

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

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

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

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

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

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

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

I think we can reject this if only on performance grounds (sine it complicates the calculation for very little changes in the usual case).

I would call for an "abandon revision", but up to you :)

It will become useful when we garrison melee units on towered elephants.

Silier requested changes to this revision.EditedSep 9 2020, 4:27 PM
Silier added a subscriber: Silier.

Right now,
range queries for melee units perfectly matches their range attacks,
range queries for ranged units does not because they use the same non-parabolic query as rest of units.
May be because performance or because no-one bothered to give them parabolic queries. I believe there is ticket for that. Anyway that causes ranged units to get targets which are actually out of range or not get targets that would be in parabolic range.

Spreading this issue to melee units is not happy solution. Also I am not sure if this is actually needed for melee. Or target is 2 meters from me and I can reach in any direction, does not matter if target stays a bit higher than me or below or I cant reach it because my weapon is too short.

This revision now requires changes to proceed.Sep 9 2020, 4:27 PM

If you wield a sarissa it does matter whether your target is at exactly six meters away horizontally or six meters horizontally and two meters up (e.g. on top of an elephant).

I understand this is (currently) unwanted and slows stuff down.

Freagarach planned changes to this revision.Sep 17 2020, 10:17 AM
In D2161#131391, @Angen wrote:

Spreading this issue to melee units is not happy solution. Also I am not sure if this is actually needed for melee. Or target is 2 meters from me and I can reach in any direction, does not matter if target stays a bit higher than me or below or I cant reach it because my weapon is too short.

Notice melee units don't use parabolic range, so the only described case that would be true is that the range query would return entities which are actually out of range.

(Also move to target attack range would need an update.)

With patch:


Without patch:

nifa added a subscriber: nifa.Feb 4 2021, 5:10 PM

so if they dont use parabolic query, then query they use is wrong compared to the range checks in js

Silier resigned from this revision.Jul 31 2023, 5:24 PM