Page MenuHomeWildfire Games

Remove SelectAnimation from MoveStarted and MoveCompleted
AbandonedPublic

Authored by temple on Feb 23 2018, 11:06 PM.

Details

Reviewers
Silier
wraitii
Summary

Animations should be selected upon entering a state. At best it seems the three cases here could mask bugs with units not transitioning to the correct state. If a unit should be showing an idle animation then they should be in an idle state too (idle, guarding, loading), for example.

Test Plan

Might want to look at rP17028 and rP17036.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 5159
Build 8830: Vulcan BuildJenkins
Build 8828: arc lint + arc unit

Event Timeline

temple created this revision.Feb 23 2018, 11:06 PM
Silier added a subscriber: Silier.Feb 23 2018, 11:18 PM

Make formation, give them order to chop tree and they end moving without walking.

Silier requested changes to this revision.Feb 23 2018, 11:22 PM
This revision now requires changes to proceed.Feb 23 2018, 11:22 PM
Vulcan added a subscriber: Vulcan.Feb 24 2018, 2:49 AM

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

Linter detected issues:
Executing section Default...
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'targetVisibleEnemies' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  73|  73| // do worry around armies slaughtering the guy standing next to you), etc.
|  74|  74| var g_Stances = {
|  75|  75| 	"violent": {
|  76|    |-		targetVisibleEnemies: true,
|    |  76|+		"targetVisibleEnemies": true,
|  77|  77| 		targetAttackersAlways: true,
|  78|  78| 		respondFlee: false,
|  79|  79| 		respondChase: true,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'targetAttackersAlways' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  74|  74| var g_Stances = {
|  75|  75| 	"violent": {
|  76|  76| 		targetVisibleEnemies: true,
|  77|    |-		targetAttackersAlways: true,
|    |  77|+		"targetAttackersAlways": true,
|  78|  78| 		respondFlee: false,
|  79|  79| 		respondChase: true,
|  80|  80| 		respondChaseBeyondVision: true,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondFlee' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  75|  75| 	"violent": {
|  76|  76| 		targetVisibleEnemies: true,
|  77|  77| 		targetAttackersAlways: true,
|  78|    |-		respondFlee: false,
|    |  78|+		"respondFlee": false,
|  79|  79| 		respondChase: true,
|  80|  80| 		respondChaseBeyondVision: true,
|  81|  81| 		respondStandGround: false,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondChase' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  76|  76| 		targetVisibleEnemies: true,
|  77|  77| 		targetAttackersAlways: true,
|  78|  78| 		respondFlee: false,
|  79|    |-		respondChase: true,
|    |  79|+		"respondChase": true,
|  80|  80| 		respondChaseBeyondVision: true,
|  81|  81| 		respondStandGround: false,
|  82|  82| 		respondHoldGround: false,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondChaseBeyondVision' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  77|  77| 		targetAttackersAlways: true,
|  78|  78| 		respondFlee: false,
|  79|  79| 		respondChase: true,
|  80|    |-		respondChaseBeyondVision: true,
|    |  80|+		"respondChaseBeyondVision": true,
|  81|  81| 		respondStandGround: false,
|  82|  82| 		respondHoldGround: false,
|  83|  83| 	},
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondStandGround' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  78|  78| 		respondFlee: false,
|  79|  79| 		respondChase: true,
|  80|  80| 		respondChaseBeyondVision: true,
|  81|    |-		respondStandGround: false,
|    |  81|+		"respondStandGround": false,
|  82|  82| 		respondHoldGround: false,
|  83|  83| 	},
|  84|  84| 	"aggressive": {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondHoldGround' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  79|  79| 		respondChase: true,
|  80|  80| 		respondChaseBeyondVision: true,
|  81|  81| 		respondStandGround: false,
|  82|    |-		respondHoldGround: false,
|    |  82|+		"respondHoldGround": false,
|  83|  83| 	},
|  84|  84| 	"aggressive": {
|  85|  85| 		targetVisibleEnemies: true,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'targetVisibleEnemies' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  82|  82| 		respondHoldGround: false,
|  83|  83| 	},
|  84|  84| 	"aggressive": {
|  85|    |-		targetVisibleEnemies: true,
|    |  85|+		"targetVisibleEnemies": true,
|  86|  86| 		targetAttackersAlways: false,
|  87|  87| 		respondFlee: false,
|  88|  88| 		respondChase: true,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'targetAttackersAlways' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  83|  83| 	},
|  84|  84| 	"aggressive": {
|  85|  85| 		targetVisibleEnemies: true,
|  86|    |-		targetAttackersAlways: false,
|    |  86|+		"targetAttackersAlways": false,
|  87|  87| 		respondFlee: false,
|  88|  88| 		respondChase: true,
|  89|  89| 		respondChaseBeyondVision: false,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondFlee' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  84|  84| 	"aggressive": {
|  85|  85| 		targetVisibleEnemies: true,
|  86|  86| 		targetAttackersAlways: false,
|  87|    |-		respondFlee: false,
|    |  87|+		"respondFlee": false,
|  88|  88| 		respondChase: true,
|  89|  89| 		respondChaseBeyondVision: false,
|  90|  90| 		respondStandGround: false,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondChase' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  85|  85| 		targetVisibleEnemies: true,
|  86|  86| 		targetAttackersAlways: false,
|  87|  87| 		respondFlee: false,
|  88|    |-		respondChase: true,
|    |  88|+		"respondChase": true,
|  89|  89| 		respondChaseBeyondVision: false,
|  90|  90| 		respondStandGround: false,
|  91|  91| 		respondHoldGround: false,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondChaseBeyondVision' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  86|  86| 		targetAttackersAlways: false,
|  87|  87| 		respondFlee: false,
|  88|  88| 		respondChase: true,
|  89|    |-		respondChaseBeyondVision: false,
|    |  89|+		"respondChaseBeyondVision": false,
|  90|  90| 		respondStandGround: false,
|  91|  91| 		respondHoldGround: false,
|  92|  92| 	},
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondStandGround' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  87|  87| 		respondFlee: false,
|  88|  88| 		respondChase: true,
|  89|  89| 		respondChaseBeyondVision: false,
|  90|    |-		respondStandGround: false,
|    |  90|+		"respondStandGround": false,
|  91|  91| 		respondHoldGround: false,
|  92|  92| 	},
|  93|  93| 	"defensive": {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondHoldGround' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  88|  88| 		respondChase: true,
|  89|  89| 		respondChaseBeyondVision: false,
|  90|  90| 		respondStandGround: false,
|  91|    |-		respondHoldGround: false,
|    |  91|+		"respondHoldGround": false,
|  92|  92| 	},
|  93|  93| 	"defensive": {
|  94|  94| 		targetVisibleEnemies: true,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'targetVisibleEnemies' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  91|  91| 		respondHoldGround: false,
|  92|  92| 	},
|  93|  93| 	"defensive": {
|  94|    |-		targetVisibleEnemies: true,
|    |  94|+		"targetVisibleEnemies": true,
|  95|  95| 		targetAttackersAlways: false,
|  96|  96| 		respondFlee: false,
|  97|  97| 		respondChase: false,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'targetAttackersAlways' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  92|  92| 	},
|  93|  93| 	"defensive": {
|  94|  94| 		targetVisibleEnemies: true,
|  95|    |-		targetAttackersAlways: false,
|    |  95|+		"targetAttackersAlways": false,
|  96|  96| 		respondFlee: false,
|  97|  97| 		respondChase: false,
|  98|  98| 		respondChaseBeyondVision: false,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondFlee' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  93|  93| 	"defensive": {
|  94|  94| 		targetVisibleEnemies: true,
|  95|  95| 		targetAttackersAlways: false,
|  96|    |-		respondFlee: false,
|    |  96|+		"respondFlee": false,
|  97|  97| 		respondChase: false,
|  98|  98| 		respondChaseBeyondVision: false,
|  99|  99| 		respondStandGround: false,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondChase' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  94|  94| 		targetVisibleEnemies: true,
|  95|  95| 		targetAttackersAlways: false,
|  96|  96| 		respondFlee: false,
|  97|    |-		respondChase: false,
|    |  97|+		"respondChase": false,
|  98|  98| 		respondChaseBeyondVision: false,
|  99|  99| 		respondStandGround: false,
| 100| 100| 		respondHoldGround: true,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondChaseBeyondVision' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  95|  95| 		targetAttackersAlways: false,
|  96|  96| 		respondFlee: false,
|  97|  97| 		respondChase: false,
|  98|    |-		respondChaseBeyondVision: false,
|    |  98|+		"respondChaseBeyondVision": false,
|  99|  99| 		respondStandGround: false,
| 100| 100| 		respondHoldGround: true,
| 101| 101| 	},
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondStandGround' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  96|  96| 		respondFlee: false,
|  97|  97| 		respondChase: false,
|  98|  98| 		respondChaseBeyondVision: false,
|  99|    |-		respondStandGround: false,
|    |  99|+		"respondStandGround": false,
| 100| 100| 		respondHoldGround: true,
| 101| 101| 	},
| 102| 102| 	"passive": {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondHoldGround' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|  97|  97| 		respondChase: false,
|  98|  98| 		respondChaseBeyondVision: false,
|  99|  99| 		respondStandGround: false,
| 100|    |-		respondHoldGround: true,
|    | 100|+		"respondHoldGround": true,
| 101| 101| 	},
| 102| 102| 	"passive": {
| 103| 103| 		targetVisibleEnemies: false,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'targetVisibleEnemies' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 100| 100| 		respondHoldGround: true,
| 101| 101| 	},
| 102| 102| 	"passive": {
| 103|    |-		targetVisibleEnemies: false,
|    | 103|+		"targetVisibleEnemies": false,
| 104| 104| 		targetAttackersAlways: false,
| 105| 105| 		respondFlee: true,
| 106| 106| 		respondChase: false,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'targetAttackersAlways' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 101| 101| 	},
| 102| 102| 	"passive": {
| 103| 103| 		targetVisibleEnemies: false,
| 104|    |-		targetAttackersAlways: false,
|    | 104|+		"targetAttackersAlways": false,
| 105| 105| 		respondFlee: true,
| 106| 106| 		respondChase: false,
| 107| 107| 		respondChaseBeyondVision: false,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondFlee' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 102| 102| 	"passive": {
| 103| 103| 		targetVisibleEnemies: false,
| 104| 104| 		targetAttackersAlways: false,
| 105|    |-		respondFlee: true,
|    | 105|+		"respondFlee": true,
| 106| 106| 		respondChase: false,
| 107| 107| 		respondChaseBeyondVision: false,
| 108| 108| 		respondStandGround: false,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondChase' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 103| 103| 		targetVisibleEnemies: false,
| 104| 104| 		targetAttackersAlways: false,
| 105| 105| 		respondFlee: true,
| 106|    |-		respondChase: false,
|    | 106|+		"respondChase": false,
| 107| 107| 		respondChaseBeyondVision: false,
| 108| 108| 		respondStandGround: false,
| 109| 109| 		respondHoldGround: false,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondChaseBeyondVision' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 104| 104| 		targetAttackersAlways: false,
| 105| 105| 		respondFlee: true,
| 106| 106| 		respondChase: false,
| 107|    |-		respondChaseBeyondVision: false,
|    | 107|+		"respondChaseBeyondVision": false,
| 108| 108| 		respondStandGround: false,
| 109| 109| 		respondHoldGround: false,
| 110| 110| 	},
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondStandGround' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 105| 105| 		respondFlee: true,
| 106| 106| 		respondChase: false,
| 107| 107| 		respondChaseBeyondVision: false,
| 108|    |-		respondStandGround: false,
|    | 108|+		"respondStandGround": false,
| 109| 109| 		respondHoldGround: false,
| 110| 110| 	},
| 111| 111| 	"standground": {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondHoldGround' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 106| 106| 		respondChase: false,
| 107| 107| 		respondChaseBeyondVision: false,
| 108| 108| 		respondStandGround: false,
| 109|    |-		respondHoldGround: false,
|    | 109|+		"respondHoldGround": false,
| 110| 110| 	},
| 111| 111| 	"standground": {
| 112| 112| 		targetVisibleEnemies: true,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'targetVisibleEnemies' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 109| 109| 		respondHoldGround: false,
| 110| 110| 	},
| 111| 111| 	"standground": {
| 112|    |-		targetVisibleEnemies: true,
|    | 112|+		"targetVisibleEnemies": true,
| 113| 113| 		targetAttackersAlways: false,
| 114| 114| 		respondFlee: false,
| 115| 115| 		respondChase: false,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'targetAttackersAlways' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 110| 110| 	},
| 111| 111| 	"standground": {
| 112| 112| 		targetVisibleEnemies: true,
| 113|    |-		targetAttackersAlways: false,
|    | 113|+		"targetAttackersAlways": false,
| 114| 114| 		respondFlee: false,
| 115| 115| 		respondChase: false,
| 116| 116| 		respondChaseBeyondVision: false,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondFlee' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 111| 111| 	"standground": {
| 112| 112| 		targetVisibleEnemies: true,
| 113| 113| 		targetAttackersAlways: false,
| 114|    |-		respondFlee: false,
|    | 114|+		"respondFlee": false,
| 115| 115| 		respondChase: false,
| 116| 116| 		respondChaseBeyondVision: false,
| 117| 117| 		respondStandGround: true,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondChase' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 112| 112| 		targetVisibleEnemies: true,
| 113| 113| 		targetAttackersAlways: false,
| 114| 114| 		respondFlee: false,
| 115|    |-		respondChase: false,
|    | 115|+		"respondChase": false,
| 116| 116| 		respondChaseBeyondVision: false,
| 117| 117| 		respondStandGround: true,
| 118| 118| 		respondHoldGround: false,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondChaseBeyondVision' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 113| 113| 		targetAttackersAlways: false,
| 114| 114| 		respondFlee: false,
| 115| 115| 		respondChase: false,
| 116|    |-		respondChaseBeyondVision: false,
|    | 116|+		"respondChaseBeyondVision": false,
| 117| 117| 		respondStandGround: true,
| 118| 118| 		respondHoldGround: false,
| 119| 119| 	},
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondStandGround' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 114| 114| 		respondFlee: false,
| 115| 115| 		respondChase: false,
| 116| 116| 		respondChaseBeyondVision: false,
| 117|    |-		respondStandGround: true,
|    | 117|+		"respondStandGround": true,
| 118| 118| 		respondHoldGround: false,
| 119| 119| 	},
| 120| 120| };
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'respondHoldGround' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 115| 115| 		respondChase: false,
| 116| 116| 		respondChaseBeyondVision: false,
| 117| 117| 		respondStandGround: true,
| 118|    |-		respondHoldGround: false,
|    | 118|+		"respondHoldGround": false,
| 119| 119| 	},
| 120| 120| };
| 121| 121| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 216| 216| 		// Move a tile outside the building
| 217| 217| 		let range = 4;
| 218| 218| 		if (this.MoveToTargetRangeExplicit(msg.data.target, range, range))
| 219|    |-		{
|    | 219|+		
| 220| 220| 			// We've started walking to the given point
| 221| 221| 			this.SetNextState("INDIVIDUAL.WALKING");
| 222|    |-		}
|    | 222|+		
| 223| 223| 		else
| 224| 224| 		{
| 225| 225| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 221| 221| 			this.SetNextState("INDIVIDUAL.WALKING");
| 222| 222| 		}
| 223| 223| 		else
| 224|    |-		{
|    | 224|+		
| 225| 225| 			// We are already at the target, or can't move at all
| 226| 226| 			this.FinishOrder();
| 227|    |-		}
|    | 227|+		
| 228| 228| 	},
| 229| 229| 
| 230| 230| 	// Individual orders:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 326| 326| 
| 327| 327| 		var ok = this.MoveToTarget(this.order.data.target);
| 328| 328| 		if (ok)
| 329|    |-		{
|    | 329|+		
| 330| 330| 			// We've started walking to the given point
| 331| 331| 			if (this.IsAnimal())
| 332| 332| 				this.SetNextState("ANIMAL.WALKING");
| 333| 333| 			else
| 334| 334| 				this.SetNextState("INDIVIDUAL.WALKING");
| 335|    |-		}
|    | 335|+		
| 336| 336| 		else
| 337| 337| 		{
| 338| 338| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 354| 354| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 355| 355| 		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 356| 356| 		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 357|    |-		{
|    | 357|+		
| 358| 358| 			// we were already on the shoreline, and have not moved since
| 359| 359| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
| 360| 360| 				needToMove = false;
| 361|    |-		}
|    | 361|+		
| 362| 362| 
| 363| 363| 		// TODO: what if the units are on a cliff ? the ship will go below the cliff
| 364| 364| 		// and the units won't be able to garrison. Should go to the nearest (accessible) shore
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 352| 352| 		// Check if we need to move     TODO implement a better way to know if we are on the shoreline
| 353| 353| 		var needToMove = true;
| 354| 354| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 355|    |-		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 356|    |-		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
|    | 355|+		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x) &&
|    | 356|+		    (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 357| 357| 		{
| 358| 358| 			// we were already on the shoreline, and have not moved since
| 359| 359| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 363| 363| 		// TODO: what if the units are on a cliff ? the ship will go below the cliff
| 364| 364| 		// and the units won't be able to garrison. Should go to the nearest (accessible) shore
| 365| 365| 		if (needToMove && this.MoveToTarget(this.order.data.target))
| 366|    |-		{
|    | 366|+		
| 367| 367| 			this.SetNextState("INDIVIDUAL.PICKUP.APPROACHING");
| 368|    |-		}
|    | 368|+		
| 369| 369| 		else
| 370| 370| 		{
| 371| 371| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 392| 392| 		var distance = DistanceBetweenEntities(this.entity, this.order.data.target) + (+this.template.FleeDistance);
| 393| 393| 		var cmpUnitMotion = Engine.QueryInterface(this.entity, IID_UnitMotion);
| 394| 394| 		if (cmpUnitMotion.MoveToTargetRange(this.order.data.target, distance, -1))
| 395|    |-		{
|    | 395|+		
| 396| 396| 			// We've started fleeing from the given target
| 397| 397| 			if (this.IsAnimal())
| 398| 398| 				this.SetNextState("ANIMAL.FLEEING");
| 399| 399| 			else
| 400| 400| 				this.SetNextState("INDIVIDUAL.FLEEING");
| 401|    |-		}
|    | 401|+		
| 402| 402| 		else
| 403| 403| 		{
| 404| 404| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 448| 448| 			}
| 449| 449| 
| 450| 450| 			if (this.order.data.attackType == this.oldAttackType)
| 451|    |-			{
|    | 451|+			
| 452| 452| 				if (this.IsAnimal())
| 453| 453| 					this.SetNextState("ANIMAL.COMBAT.ATTACKING");
| 454| 454| 				else
| 455| 455| 					this.SetNextState("INDIVIDUAL.COMBAT.ATTACKING");
| 456|    |-			}
|    | 456|+			
| 457| 457| 			else
| 458| 458| 			{
| 459| 459| 				if (this.IsAnimal())
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 455| 455| 					this.SetNextState("INDIVIDUAL.COMBAT.ATTACKING");
| 456| 456| 			}
| 457| 457| 			else
| 458|    |-			{
|    | 458|+			
| 459| 459| 				if (this.IsAnimal())
| 460| 460| 					this.SetNextStateAlwaysEntering("ANIMAL.COMBAT.ATTACKING");
| 461| 461| 				else
| 462| 462| 					this.SetNextStateAlwaysEntering("INDIVIDUAL.COMBAT.ATTACKING");
| 463|    |-			}
|    | 463|+			
| 464| 464| 			return;
| 465| 465| 		}
| 466| 466| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 593| 593| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 594| 594| 				}
| 595| 595| 				else
| 596|    |-				{
|    | 596|+				
| 597| 597| 					// We couldn't move there, or the target moved away
| 598| 598| 					this.FinishOrder();
| 599|    |-				}
|    | 599|+				
| 600| 600| 				return;
| 601| 601| 			}
| 602| 602| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 606| 606| 
| 607| 607| 		// Try to move within range
| 608| 608| 		if (this.MoveToTargetRange(this.order.data.target, IID_ResourceGatherer))
| 609|    |-		{
|    | 609|+		
| 610| 610| 			// We've started walking to the given point
| 611| 611| 			this.SetNextState("INDIVIDUAL.GATHER.APPROACHING");
| 612|    |-		}
|    | 612|+		
| 613| 613| 		else
| 614| 614| 		{
| 615| 615| 			// We are already at the target, or can't move at all,
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 683| 683| 	"Order.Repair": function(msg) {
| 684| 684| 		// Try to move within range
| 685| 685| 		if (this.MoveToTargetRange(this.order.data.target, IID_Builder))
| 686|    |-		{
|    | 686|+		
| 687| 687| 			// We've started walking to the given point
| 688| 688| 			this.SetNextState("INDIVIDUAL.REPAIR.APPROACHING");
| 689|    |-		}
|    | 689|+		
| 690| 690| 		else
| 691| 691| 		{
| 692| 692| 			// We are already at the target, or can't move at all,
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 720| 720| 		}
| 721| 721| 
| 722| 722| 		if (this.MoveToGarrisonRange(this.order.data.target))
| 723|    |-		{
|    | 723|+		
| 724| 724| 			this.SetNextState("INDIVIDUAL.GARRISON.APPROACHING");
| 725|    |-		}
|    | 725|+		
| 726| 726| 		else
| 727| 727| 		{
| 728| 728| 			// We do a range check before actually garrisoning
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 858| 858| 			if (!this.CheckTargetAttackRange(target, target))
| 859| 859| 			{
| 860| 860| 				if (this.TargetIsAlive(target) && this.CheckTargetVisible(target))
| 861|    |-				{
|    | 861|+				
| 862| 862| 					if (this.MoveToTargetAttackRange(target, target))
| 863| 863| 					{
| 864| 864| 						this.SetNextState("COMBAT.APPROACHING");
| 865| 865| 						return;
| 866| 866| 					}
| 867|    |-				}
|    | 867|+				
| 868| 868| 				this.FinishOrder();
| 869| 869| 				return;
| 870| 870| 			}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 883| 883| 			}
| 884| 884| 			// Check if we are already in range, otherwise walk there
| 885| 885| 			if (!this.CheckGarrisonRange(msg.data.target))
| 886|    |-			{
|    | 886|+			
| 887| 887| 				if (!this.CheckTargetVisible(msg.data.target))
| 888| 888| 				{
| 889| 889| 					this.FinishOrder();
| 898| 898| 						return;
| 899| 899| 					}
| 900| 900| 				}
| 901|    |-			}
|    | 901|+			
| 902| 902| 
| 903| 903| 			this.SetNextState("GARRISON.GARRISONING");
| 904| 904| 		},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 890| 890| 					return;
| 891| 891| 				}
| 892| 892| 				else
| 893|    |-				{
|    | 893|+				
| 894| 894| 					// Out of range; move there in formation
| 895| 895| 					if (this.MoveToGarrisonRange(msg.data.target))
| 896| 896| 					{
| 897| 897| 						this.SetNextState("GARRISON.APPROACHING");
| 898| 898| 						return;
| 899| 899| 					}
| 900|    |-				}
|    | 900|+				
| 901| 901| 			}
| 902| 902| 
| 903| 903| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 889| 889| 					this.FinishOrder();
| 890| 890| 					return;
| 891| 891| 				}
| 892|    |-				else
| 893|    |-				{
|    | 892|+				
| 894| 893| 					// Out of range; move there in formation
| 895| 894| 					if (this.MoveToGarrisonRange(msg.data.target))
| 896| 895| 					{
| 897| 896| 						this.SetNextState("GARRISON.APPROACHING");
| 898| 897| 						return;
| 899| 898| 					}
| 900|    |-				}
|    | 899|+				
| 901| 900| 			}
| 902| 901| 
| 903| 902| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 916| 916| 						this.PushOrderFront("Walk", msg.data.lastPos);
| 917| 917| 					}
| 918| 918| 					else
| 919|    |-					{
|    | 919|+					
| 920| 920| 						// We couldn't move there, or the target moved away
| 921| 921| 						this.FinishOrder();
| 922|    |-					}
|    | 922|+					
| 923| 923| 					return;
| 924| 924| 				}
| 925| 925| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'GARRISON'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1137|1137| 			},
|1138|1138| 		},
|1139|1139| 
|1140|    |-		"GARRISON":{
|    |1140|+		"GARRISON": {
|1141|1141| 			"enter": function() {
|1142|1142| 				// If the garrisonholder should pickup, warn it so it can take needed action
|1143|1143| 				var cmpGarrisonHolder = Engine.QueryInterface(this.order.data.target, IID_GarrisonHolder);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1318|1318| 			// If the controller handled an order but some members rejected it,
|1319|1319| 			// they will have no orders and be in the FORMATIONMEMBER.IDLE state.
|1320|1320| 			if (this.orderQueue.length)
|1321|    |-			{
|    |1321|+			
|1322|1322| 				// We're leaving the formation, so stop our FormationWalk order
|1323|1323| 				if (this.FinishOrder())
|1324|1324| 					return;
|1325|    |-			}
|    |1325|+			
|1326|1326| 
|1327|1327| 			// No orders left, we're an individual now
|1328|1328| 			if (this.IsAnimal())
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1346|1346| 			// Move a tile outside the building
|1347|1347| 			let range = 4;
|1348|1348| 			if (this.MoveToTargetRangeExplicit(msg.data.target, range, range))
|1349|    |-			{
|    |1349|+			
|1350|1350| 				// We've started walking to the given point
|1351|1351| 				this.SetNextState("WALKINGTOPOINT");
|1352|    |-			}
|    |1352|+			
|1353|1353| 			else
|1354|1354| 			{
|1355|1355| 				// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1351|1351| 				this.SetNextState("WALKINGTOPOINT");
|1352|1352| 			}
|1353|1353| 			else
|1354|    |-			{
|    |1354|+			
|1355|1355| 				// We are already at the target, or can't move at all
|1356|1356| 				this.FinishOrder();
|1357|    |-			}
|    |1357|+			
|1358|1358| 		},
|1359|1359| 
|1360|1360| 
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1369|1369| 		},
|1370|1370| 
|1371|1371| 		"WALKING": {
|1372|    |-			"enter": function () {
|    |1372|+			"enter": function() {
|1373|1373| 				var cmpFormation = Engine.QueryInterface(this.formationController, IID_Formation);
|1374|1374| 				var cmpVisual = Engine.QueryInterface(this.entity, IID_Visual);
|1375|1375| 				if (cmpFormation && cmpVisual)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1552|1552| 
|1553|1553| 			"LosRangeUpdate": function(msg) {
|1554|1554| 				if (this.GetStance().targetVisibleEnemies)
|1555|    |-				{
|    |1555|+				
|1556|1556| 					// Start attacking one of the newly-seen enemy (if any)
|1557|1557| 					this.AttackEntitiesByPreference(msg.data.added);
|1558|    |-				}
|    |1558|+				
|1559|1559| 			},
|1560|1560| 
|1561|1561| 			"LosHealRangeUpdate": function(msg) {
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1572|1572| 		},
|1573|1573| 
|1574|1574| 		"WALKING": {
|1575|    |-			"enter": function () {
|    |1575|+			"enter": function() {
|1576|1576| 				this.SelectAnimation("move");
|1577|1577| 			},
|1578|1578| 
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1582|1582| 		},
|1583|1583| 
|1584|1584| 		"WALKINGANDFIGHTING": {
|1585|    |-			"enter": function () {
|    |1585|+			"enter": function() {
|1586|1586| 				// Show weapons rather than carried resources.
|1587|1587| 				this.SetAnimationVariant("combat");
|1588|1588| 
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1605|1605| 		},
|1606|1606| 
|1607|1607| 		"PATROL": {
|1608|    |-			"enter": function () {
|    |1608|+			"enter": function() {
|1609|1609| 				// Memorize the origin position in case that we want to go back
|1610|1610| 				let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
|1611|1611| 				if (!cmpPosition || !cmpPosition.IsInWorld())
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1651|1651| 			},
|1652|1652| 
|1653|1653| 			"ESCORTING": {
|1654|    |-				"enter": function () {
|    |1654|+				"enter": function() {
|1655|1655| 					// Show weapons rather than carried resources.
|1656|1656| 					this.SetAnimationVariant("combat");
|1657|1657| 
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1701|1701| 			},
|1702|1702| 
|1703|1703| 			"GUARDING": {
|1704|    |-				"enter": function () {
|    |1704|+				"enter": function() {
|1705|1705| 					this.StartTimer(1000, 1000);
|1706|1706| 					this.SetHeldPositionOnEntity(this.entity);
|1707|1707| 					this.SetAnimationVariant("combat");
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1730|1730| 						// if nothing better to do, check if the guarded needs to be healed or repaired
|1731|1731| 						var cmpHealth = Engine.QueryInterface(this.isGuardOf, IID_Health);
|1732|1732| 						if (cmpHealth && (cmpHealth.GetHitpoints() < cmpHealth.GetMaxHitpoints()))
|1733|    |-						{
|    |1733|+						
|1734|1734| 							if (this.CanHeal(this.isGuardOf))
|1735|1735| 								this.PushOrderFront("Heal", { "target": this.isGuardOf, "force": false });
|1736|1736| 							else if (this.CanRepair(this.isGuardOf))
|1737|1737| 								this.PushOrderFront("Repair", { "target": this.isGuardOf, "autocontinue": false, "force": false });
|1738|    |-						}
|    |1738|+						
|1739|1739| 					}
|1740|1740| 				},
|1741|1741| 
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1788|1788| 			},
|1789|1789| 
|1790|1790| 			"APPROACHING": {
|1791|    |-				"enter": function () {
|    |1791|+				"enter": function() {
|1792|1792| 					// Show weapons rather than carried resources.
|1793|1793| 					this.SetAnimationVariant("combat");
|1794|1794| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1818|1818| 				"MoveCompleted": function() {
|1819|1819| 
|1820|1820| 					if (this.CheckTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1821|    |-					{
|    |1821|+					
|1822|1822| 						// If the unit needs to unpack, do so
|1823|1823| 						if (this.CanUnpack())
|1824|1824| 						{
|1827|1827| 						}
|1828|1828| 						else
|1829|1829| 							this.SetNextState("ATTACKING");
|1830|    |-					}
|    |1830|+					
|1831|1831| 					else
|1832|1832| 					{
|1833|1833| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1825|1825| 							this.PushOrderFront("Unpack", { "force": true });
|1826|1826| 							return;
|1827|1827| 						}
|1828|    |-						else
|1829|    |-							this.SetNextState("ATTACKING");
|    |1828|+						this.SetNextState("ATTACKING");
|1830|1829| 					}
|1831|1830| 					else
|1832|1831| 					{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1829|1829| 							this.SetNextState("ATTACKING");
|1830|1830| 					}
|1831|1831| 					else
|1832|    |-					{
|    |1832|+					
|1833|1833| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1834|1834| 						{
|1835|1835| 							this.SetNextState("APPROACHING");
|1839|1839| 							// Give up
|1840|1840| 							this.FinishOrder();
|1841|1841| 						}
|1842|    |-					}
|    |1842|+					
|1843|1843| 				},
|1844|1844| 			},
|1845|1845| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1831|1831| 					else
|1832|1832| 					{
|1833|1833| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1834|    |-						{
|    |1834|+						
|1835|1835| 							this.SetNextState("APPROACHING");
|1836|    |-						}
|    |1836|+						
|1837|1837| 						else
|1838|1838| 						{
|1839|1839| 							// Give up
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1835|1835| 							this.SetNextState("APPROACHING");
|1836|1836| 						}
|1837|1837| 						else
|1838|    |-						{
|    |1838|+						
|1839|1839| 							// Give up
|1840|1840| 							this.FinishOrder();
|1841|    |-						}
|    |1841|+						
|1842|1842| 					}
|1843|1843| 				},
|1844|1844| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1856|1856| 					}
|1857|1857| 					// Check the target is still alive and attackable
|1858|1858| 					if (this.CanAttack(target) && !this.CheckTargetAttackRange(target, this.order.data.attackType))
|1859|    |-					{
|    |1859|+					
|1860|1860| 						// Can't reach it - try to chase after it
|1861|1861| 						if (this.ShouldChaseTargetedEntity(target, this.order.data.force))
|1862|1862| 						{
|1866|1866| 								return;
|1867|1867| 							}
|1868|1868| 						}
|1869|    |-					}
|    |1869|+					
|1870|1870| 
|1871|1871| 					var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|1872|1872| 					this.attackTimers = cmpAttack.GetTimers(this.order.data.attackType);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1859|1859| 					{
|1860|1860| 						// Can't reach it - try to chase after it
|1861|1861| 						if (this.ShouldChaseTargetedEntity(target, this.order.data.force))
|1862|    |-						{
|    |1862|+						
|1863|1863| 							if (this.MoveToTargetAttackRange(target, this.order.data.attackType))
|1864|1864| 							{
|1865|1865| 								this.SetNextState("COMBAT.CHASING");
|1866|1866| 								return;
|1867|1867| 							}
|1868|    |-						}
|    |1868|+						
|1869|1869| 					}
|1870|1870| 
|1871|1871| 					var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1897|1897| 					// TODO: we should probably only bother syncing projectile attacks, not melee
|1898|1898| 
|1899|1899| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|1900|    |-					this.resyncAnimation = (prepare != this.attackTimers.prepare) ? true : false;
|    |1900|+					this.resyncAnimation = (prepare != this.attackTimers.prepare);
|1901|1901| 
|1902|1902| 					this.FaceTowardsTarget(this.order.data.target);
|1903|1903| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1972|1972| 
|1973|1973| 						// Can't reach it - try to chase after it
|1974|1974| 						if (this.ShouldChaseTargetedEntity(target, this.order.data.force))
|1975|    |-						{
|    |1975|+						
|1976|1976| 							if (this.MoveToTargetRange(target, IID_Attack, this.order.data.attackType))
|1977|1977| 							{
|1978|1978| 								this.SetNextState("COMBAT.CHASING");
|1979|1979| 								return;
|1980|1980| 							}
|1981|    |-						}
|    |1981|+						
|1982|1982| 					}
|1983|1983| 
|1984|1984| 					// if we're targetting a formation, find a new member of that formation
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2019|2019| 
|2020|2020| 				"Attacked": function(msg) {
|2021|2021| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2022|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2023|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2022|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2023|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2024|2024| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2025|2025| 				},
|2026|2026| 			},
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2026|2026| 			},
|2027|2027| 
|2028|2028| 			"CHASING": {
|2029|    |-				"enter": function () {
|    |2029|+				"enter": function() {
|2030|2030| 					// Show weapons rather than carried resources.
|2031|2031| 					this.SetAnimationVariant("combat");
|2032|2032| 
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2101|2101| 
|2102|2102| 						// Try to find another nearby target of the same specific type
|2103|2103| 						// Also don't switch to a different type of huntable animal
|2104|    |-						var nearby = this.FindNearbyResource(function (ent, type, template) {
|    |2104|+						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2105|2105| 							return (
|2106|2106| 								ent != oldTarget
|2107|2107| 								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2103|2103| 						// Also don't switch to a different type of huntable animal
|2104|2104| 						var nearby = this.FindNearbyResource(function (ent, type, template) {
|2105|2105| 							return (
|2106|    |-								ent != oldTarget
|2107|    |-								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|    |2106|+								ent != oldTarget &&
|    |2107|+								 ((type.generic == "treasure" && oldType.generic == "treasure")
|2108|2108| 								 || (type.specific == oldType.specific
|2109|2109| 								 && (type.specific != "meat" || oldTemplate == template)))
|2110|2110| 							);
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2104|2104| 						var nearby = this.FindNearbyResource(function (ent, type, template) {
|2105|2105| 							return (
|2106|2106| 								ent != oldTarget
|2107|    |-								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|2108|    |-								 || (type.specific == oldType.specific
|    |2107|+								 && ((type.generic == "treasure" && oldType.generic == "treasure") ||
|    |2108|+								 (type.specific == oldType.specific
|2109|2109| 								 && (type.specific != "meat" || oldTemplate == template)))
|2110|2110| 							);
|2111|2111| 						}, oldTarget);
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2105|2105| 							return (
|2106|2106| 								ent != oldTarget
|2107|2107| 								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|2108|    |-								 || (type.specific == oldType.specific
|2109|    |-								 && (type.specific != "meat" || oldTemplate == template)))
|    |2108|+								 || (type.specific == oldType.specific &&
|    |2109|+								 (type.specific != "meat" || oldTemplate == template)))
|2110|2110| 							);
|2111|2111| 						}, oldTarget);
|2112|2112| 						if (nearby)
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2114|2114| 							this.PerformGather(nearby, false, false);
|2115|2115| 							return true;
|2116|2116| 						}
|2117|    |-						else
|2118|    |-						{
|    |2117|+						
|2119|2118| 							// It's probably better in this case, to avoid units getting stuck around a dropsite
|2120|2119| 							// in a "Target is far away, full, nearby are no good resources, return to dropsite" loop
|2121|2120| 							// to order it to GatherNear the resource position.
|2136|2135| 									return true;
|2137|2136| 								}
|2138|2137| 							}
|2139|    |-						}
|    |2138|+						
|2140|2139| 						return true;
|2141|2140| 					}
|2142|2141| 					return false;
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2126|2126| 								this.GatherNearPosition(pos.x, pos.z, oldType, oldTemplate);
|2127|2127| 								return true;
|2128|2128| 							}
|2129|    |-							else
|2130|    |-							{
|    |2129|+							
|2131|2130| 								// we're kind of stuck here. Return resource.
|2132|2131| 								var nearby = this.FindNearestDropsite(oldType.generic);
|2133|2132| 								if (nearby)
|2135|2134| 									this.PushOrderFront("ReturnResource", { "target": nearby, "force": false });
|2136|2135| 									return true;
|2137|2136| 								}
|2138|    |-							}
|    |2137|+							
|2139|2138| 						}
|2140|2139| 						return true;
|2141|2140| 					}
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2166|2166| 
|2167|2167| 						// Try to find another nearby target of the same specific type
|2168|2168| 						// Also don't switch to a different type of huntable animal
|2169|    |-						var nearby = this.FindNearbyResource(function (ent, type, template) {
|    |2169|+						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2170|2170| 							return (
|2171|2171| 								ent != oldTarget
|2172|2172| 								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2168|2168| 						// Also don't switch to a different type of huntable animal
|2169|2169| 						var nearby = this.FindNearbyResource(function (ent, type, template) {
|2170|2170| 							return (
|2171|    |-								ent != oldTarget
|2172|    |-								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|    |2171|+								ent != oldTarget &&
|    |2172|+								((type.generic == "treasure" && oldType.generic == "treasure")
|2173|2173| 								|| (type.specific == oldType.specific
|2174|2174| 								&& (type.specific != "meat" || oldTemplate == template)))
|2175|2175| 							);
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2169|2169| 						var nearby = this.FindNearbyResource(function (ent, type, template) {
|2170|2170| 							return (
|2171|2171| 								ent != oldTarget
|2172|    |-								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|2173|    |-								|| (type.specific == oldType.specific
|    |2172|+								&& ((type.generic == "treasure" && oldType.generic == "treasure") ||
|    |2173|+								(type.specific == oldType.specific
|2174|2174| 								&& (type.specific != "meat" || oldTemplate == template)))
|2175|2175| 							);
|2176|2176| 						});
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2170|2170| 							return (
|2171|2171| 								ent != oldTarget
|2172|2172| 								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|2173|    |-								|| (type.specific == oldType.specific
|2174|    |-								&& (type.specific != "meat" || oldTemplate == template)))
|    |2173|+								|| (type.specific == oldType.specific &&
|    |2174|+								(type.specific != "meat" || oldTemplate == template)))
|2175|2175| 							);
|2176|2176| 						});
|2177|2177| 						if (nearby)
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2213|2213| 
|2214|2214| 					// Try to find another nearby target of the same specific type
|2215|2215| 					// Also don't switch to a different type of huntable animal
|2216|    |-					var nearby = this.FindNearbyResource(function (ent, type, template) {
|    |2216|+					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2217|2217| 						return (
|2218|2218| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2219|2219| 							|| (type.specific == resourceType.specific
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2215|2215| 					// Also don't switch to a different type of huntable animal
|2216|2216| 					var nearby = this.FindNearbyResource(function (ent, type, template) {
|2217|2217| 						return (
|2218|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2219|    |-							|| (type.specific == resourceType.specific
|    |2218|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2219|+							(type.specific == resourceType.specific
|2220|2220| 							&& (type.specific != "meat" || resourceTemplate == template))
|2221|2221| 						);
|2222|2222| 					});
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2216|2216| 					var nearby = this.FindNearbyResource(function (ent, type, template) {
|2217|2217| 						return (
|2218|2218| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2219|    |-							|| (type.specific == resourceType.specific
|2220|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2219|+							|| (type.specific == resourceType.specific &&
|    |2220|+							(type.specific != "meat" || resourceTemplate == template))
|2221|2221| 						);
|2222|2222| 					});
|2223|2223| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2332|2332| 
|2333|2333| 					var cmpSupply = Engine.QueryInterface(this.gatheringTarget, IID_ResourceSupply);
|2334|2334| 					if (cmpSupply && cmpSupply.IsAvailable(cmpOwnership.GetOwner(), this.entity))
|2335|    |-					{
|    |2335|+					
|2336|2336| 						// Check we can still reach and gather from the target
|2337|2337| 						if (this.CheckTargetRange(this.gatheringTarget, IID_ResourceGatherer) && this.CanGather(this.gatheringTarget))
|2338|2338| 						{
|2398|2398| 								return;
|2399|2399| 							}
|2400|2400| 						}
|2401|    |-					}
|    |2401|+					
|2402|2402| 
|2403|2403| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|2404|2404| 
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2422|2422| 
|2423|2423| 					// Try to find a new resource of the same specific type near our current position:
|2424|2424| 					// Also don't switch to a different type of huntable animal
|2425|    |-					var nearby = this.FindNearbyResource(function (ent, type, template) {
|    |2425|+					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2426|2426| 						return (
|2427|2427| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2428|2428| 							|| (type.specific == resourceType.specific
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2424|2424| 					// Also don't switch to a different type of huntable animal
|2425|2425| 					var nearby = this.FindNearbyResource(function (ent, type, template) {
|2426|2426| 						return (
|2427|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2428|    |-							|| (type.specific == resourceType.specific
|    |2427|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2428|+							(type.specific == resourceType.specific
|2429|2429| 							&& (type.specific != "meat" || resourceTemplate == template))
|2430|2430| 						);
|2431|2431| 					});
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2425|2425| 					var nearby = this.FindNearbyResource(function (ent, type, template) {
|2426|2426| 						return (
|2427|2427| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2428|    |-							|| (type.specific == resourceType.specific
|2429|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2428|+							|| (type.specific == resourceType.specific &&
|    |2429|+							(type.specific != "meat" || resourceTemplate == template))
|2430|2430| 						);
|2431|2431| 					});
|2432|2432| 					if (nearby)
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2466|2466| 			},
|2467|2467| 
|2468|2468| 			"APPROACHING": {
|2469|    |-				"enter": function () {
|    |2469|+				"enter": function() {
|2470|2470| 					this.SelectAnimation("move");
|2471|2471| 					this.StartTimer(1000, 1000);
|2472|2472| 				},
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2512|2512| 					this.StartTimer(prepare, this.healTimers.repeat);
|2513|2513| 
|2514|2514| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|2515|    |-					this.resyncAnimation = (prepare != this.healTimers.prepare) ? true : false;
|    |2515|+					this.resyncAnimation = (prepare != this.healTimers.prepare);
|2516|2516| 
|2517|2517| 					this.FaceTowardsTarget(this.order.data.target);
|2518|2518| 				},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2545|2545| 						}
|2546|2546| 						// Can't reach it - try to chase after it
|2547|2547| 						if (this.ShouldChaseTargetedEntity(target, this.order.data.force))
|2548|    |-						{
|    |2548|+						
|2549|2549| 							if (this.MoveToTargetRange(target, IID_Heal))
|2550|2550| 							{
|2551|2551| 								this.SetNextState("HEAL.CHASING");
|2552|2552| 								return;
|2553|2553| 							}
|2554|    |-						}
|    |2554|+						
|2555|2555| 					}
|2556|2556| 					// Can't reach it, healed to max hp or doesn't exist any more - give up
|2557|2557| 					if (this.FinishOrder())
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2567|2567| 				},
|2568|2568| 			},
|2569|2569| 			"CHASING": {
|2570|    |-				"enter": function () {
|    |2570|+				"enter": function() {
|2571|2571| 					this.SelectAnimation("move");
|2572|2572| 					this.StartTimer(1000, 1000);
|2573|2573| 				},
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2572|2572| 					this.StartTimer(1000, 1000);
|2573|2573| 				},
|2574|2574| 
|2575|    |-				"leave": function () {
|    |2575|+				"leave": function() {
|2576|2576| 					this.StopTimer();
|2577|2577| 				},
|2578|2578| 				"Timer": function(msg) {
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2586|2586| 							this.WalkToHeldPosition();
|2587|2587| 					}
|2588|2588| 				},
|2589|    |-				"MoveCompleted": function () {
|    |2589|+				"MoveCompleted": function() {
|2590|2590| 					this.SetNextState("HEALING");
|2591|2591| 				},
|2592|2592| 			},
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2595|2595| 		// Returning to dropsite
|2596|2596| 		"RETURNRESOURCE": {
|2597|2597| 			"APPROACHING": {
|2598|    |-				"enter": function () {
|    |2598|+				"enter": function() {
|2599|2599| 					this.SelectAnimation("move");
|2600|2600| 				},
|2601|2601| 
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2649|2649| 			},
|2650|2650| 
|2651|2651| 			"APPROACHINGMARKET": {
|2652|    |-				"enter": function () {
|    |2652|+				"enter": function() {
|2653|2653| 					this.SelectAnimation("move");
|2654|2654| 				},
|2655|2655| 
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2677|2677| 
|2678|2678| 		"REPAIR": {
|2679|2679| 			"APPROACHING": {
|2680|    |-				"enter": function () {
|    |2680|+				"enter": function() {
|2681|2681| 					this.SelectAnimation("move");
|2682|2682| 				},
|2683|2683| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2718|2718| 					{
|2719|2719| 						// The building was already finished/fully repaired before we arrived;
|2720|2720| 						// let the ConstructionFinished handler handle this.
|2721|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2721|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2722|2722| 						return true;
|2723|2723| 					}
|2724|2724| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2718|2718| 					{
|2719|2719| 						// The building was already finished/fully repaired before we arrived;
|2720|2720| 						// let the ConstructionFinished handler handle this.
|2721|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2721|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2722|2722| 						return true;
|2723|2723| 					}
|2724|2724| 
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2758|2758| 					if (this.MoveToTargetRange(this.repairTarget, IID_Builder))
|2759|2759| 						this.SetNextState("APPROACHING");
|2760|2760| 					else if (!this.CheckTargetRange(this.repairTarget, IID_Builder))
|2761|    |-						this.FinishOrder(); //can't approach and isn't in reach
|    |2761|+						this.FinishOrder(); // can't approach and isn't in reach
|2762|2762| 				},
|2763|2763| 			},
|2764|2764| 
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2825|2825| 					var types = cmpResourceDropsite.GetTypes();
|2826|2826| 					// TODO: Slightly undefined behavior here, we don't know what type of resource will be collected,
|2827|2827| 					//   may cause problems for AIs (especially hunting fast animals), but avoid ugly hacks to fix that!
|2828|    |-					var nearby = this.FindNearbyResource(function (ent, type, template) {
|    |2828|+					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2829|2829| 						return (types.indexOf(type.generic) != -1);
|2830|2830| 					}, msg.data.newentity);
|2831|2831| 					if (nearby)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2845|2845| 
|2846|2846| 				// Unit was approaching and there's nothing to do now, so switch to walking
|2847|2847| 				if (oldState === "INDIVIDUAL.REPAIR.APPROACHING")
|2848|    |-				{
|    |2848|+				
|2849|2849| 					// We're already walking to the given point, so add this as a order.
|2850|2850| 					this.WalkToTarget(msg.data.newentity, true);
|2851|    |-				}
|    |2851|+				
|2852|2852| 			},
|2853|2853| 		},
|2854|2854| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2895|2895| 
|2896|2896| 					// Check that we can garrison here
|2897|2897| 					if (this.CanGarrison(target))
|2898|    |-					{
|    |2898|+					
|2899|2899| 						// Check that we're in range of the garrison target
|2900|2900| 						if (this.CheckGarrisonRange(target))
|2901|2901| 						{
|2971|2971| 								return false;
|2972|2972| 							}
|2973|2973| 						}
|2974|    |-					}
|    |2974|+					
|2975|2975| 					// Garrisoning failed for some reason, so finish the order
|2976|2976| 					this.FinishOrder();
|2977|2977| 					return true;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3088|3088| 		"Attacked": function(msg) {
|3089|3089| 			if (this.template.NaturalBehaviour == "skittish" ||
|3090|3090| 			    this.template.NaturalBehaviour == "passive")
|3091|    |-			{
|    |3091|+			
|3092|3092| 				this.Flee(msg.data.attacker, false);
|3093|    |-			}
|    |3093|+			
|3094|3094| 			else if (this.IsDangerousAnimal() || this.template.NaturalBehaviour == "defensive")
|3095|3095| 			{
|3096|3096| 				if (this.CanAttack(msg.data.attacker))
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3097|3097| 					this.Attack(msg.data.attacker, false);
|3098|3098| 			}
|3099|3099| 			else if (this.template.NaturalBehaviour == "domestic")
|3100|    |-			{
|    |3100|+			
|3101|3101| 				// Never flee, stop what we were doing
|3102|3102| 				this.SetNextState("IDLE");
|3103|    |-			}
|    |3103|+			
|3104|3104| 		},
|3105|3105| 
|3106|3106| 		"Order.LeaveFoundation": function(msg) {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3107|3107| 			// Move a tile outside the building
|3108|3108| 			var range = 4;
|3109|3109| 			if (this.MoveToTargetRangeExplicit(msg.data.target, range, range))
|3110|    |-			{
|    |3110|+			
|3111|3111| 				// We've started walking to the given point
|3112|3112| 				this.SetNextState("WALKING");
|3113|    |-			}
|    |3113|+			
|3114|3114| 			else
|3115|3115| 			{
|3116|3116| 				// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3112|3112| 				this.SetNextState("WALKING");
|3113|3113| 			}
|3114|3114| 			else
|3115|    |-			{
|    |3115|+			
|3116|3116| 				// We are already at the target, or can't move at all
|3117|3117| 				this.FinishOrder();
|3118|    |-			}
|    |3118|+			
|3119|3119| 		},
|3120|3120| 
|3121|3121| 		"IDLE": {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3154|3154| 				}
|3155|3155| 				// Start attacking one of the newly-seen enemy (if any)
|3156|3156| 				else if (this.IsDangerousAnimal())
|3157|    |-				{
|    |3157|+				
|3158|3158| 					this.AttackVisibleEntity(msg.data.added);
|3159|    |-				}
|    |3159|+				
|3160|3160| 
|3161|3161| 				// TODO: if two units enter our range together, we'll attack the
|3162|3162| 				// first and then the second won't trigger another LosRangeUpdate
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3197|3197| 				}
|3198|3198| 				// Start attacking one of the newly-seen enemy (if any)
|3199|3199| 				else if (this.template.NaturalBehaviour == "violent")
|3200|    |-				{
|    |3200|+				
|3201|3201| 					this.AttackVisibleEntity(msg.data.added);
|3202|    |-				}
|    |3202|+				
|3203|3203| 			},
|3204|3204| 
|3205|3205| 			"MoveCompleted": function() { },
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3214|3214| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3215|3215| 
|3216|3216| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3217|    |-							// only used for domestic animals
|    |3217|+		// only used for domestic animals
|3218|3218| 	},
|3219|3219| };
|3220|3220| 
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3276|3276| 
|3277|3277| UnitAI.prototype.IsAnimal = function()
|3278|3278| {
|3279|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3279|+	return (!!this.template.NaturalBehaviour);
|3280|3280| };
|3281|3281| 
|3282|3282| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3314|3314| UnitAI.prototype.GetGarrisonHolder = function()
|3315|3315| {
|3316|3316| 	if (this.IsGarrisoned())
|3317|    |-	{
|    |3317|+	
|3318|3318| 		for (let order of this.orderQueue)
|3319|3319| 			if (order.type == "Garrison" || order.type == "Autogarrison")
|3320|3320| 				return order.data.target;
|3321|    |-	}
|    |3321|+	
|3322|3322| 	return INVALID_ENTITY;
|3323|3323| };
|3324|3324| 
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3395|3395| 		{
|3396|3396| 			let index = this.GetCurrentState().indexOf(".");
|3397|3397| 			if (index != -1)
|3398|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3398|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3399|3399| 			this.Stop(false);
|3400|3400| 		}
|3401|3401| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3451|3451| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3452|3452| 			continue;
|3453|3453| 		if (i == 0)
|3454|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3454|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3455|3455| 		else
|3456|3456| 			this.orderQueue.splice(i, 1);
|3457|3457| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3451|3451| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3452|3452| 			continue;
|3453|3453| 		if (i == 0)
|3454|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3454|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3455|3455| 		else
|3456|3456| 			this.orderQueue.splice(i, 1);
|3457|3457| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3535|3535| };
|3536|3536| 
|3537|3537| 
|3538|    |-//// FSM linkage functions ////
|    |3538|+// // FSM linkage functions ////
|3539|3539| 
|3540|3540| UnitAI.prototype.SetNextState = function(state)
|3541|3541| {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3586|3586| 	if (this.orderQueue.length)
|3587|3587| 	{
|3588|3588| 		let ret = this.UnitFsm.ProcessMessage(this,
|3589|    |-			{"type": "Order."+this.order.type, "data": this.order.data}
|    |3589|+			{ "type": "Order."+this.order.type, "data": this.order.data}
|3590|3590| 		);
|3591|3591| 
|3592|3592| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3586|3586| 	if (this.orderQueue.length)
|3587|3587| 	{
|3588|3588| 		let ret = this.UnitFsm.ProcessMessage(this,
|3589|    |-			{"type": "Order."+this.order.type, "data": this.order.data}
|    |3589|+			{"type": "Order."+this.order.type, "data": this.order.data }
|3590|3590| 		);
|3591|3591| 
|3592|3592| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3599|3599| 		// Otherwise we've successfully processed a new order
|3600|3600| 		return true;
|3601|3601| 	}
|3602|    |-	else
|3603|    |-	{
|    |3602|+	
|3604|3603| 		this.SetNextState("IDLE");
|3605|3604| 
|3606|3605| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3621|3620| 		}
|3622|3621| 
|3623|3622| 		return false;
|3624|    |-	}
|    |3623|+	
|3625|3624| };
|3626|3625| 
|3627|3626| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3638|3638| 	{
|3639|3639| 		this.order = order;
|3640|3640| 		let ret = this.UnitFsm.ProcessMessage(this,
|3641|    |-			{"type": "Order."+this.order.type, "data": this.order.data}
|    |3641|+			{ "type": "Order."+this.order.type, "data": this.order.data}
|3642|3642| 		);
|3643|3643| 
|3644|3644| 		// If the order was rejected then immediately take it off
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3638|3638| 	{
|3639|3639| 		this.order = order;
|3640|3640| 		let ret = this.UnitFsm.ProcessMessage(this,
|3641|    |-			{"type": "Order."+this.order.type, "data": this.order.data}
|    |3641|+			{"type": "Order."+this.order.type, "data": this.order.data }
|3642|3642| 		);
|3643|3643| 
|3644|3644| 		// If the order was rejected then immediately take it off
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3674|3674| 		this.orderQueue.unshift(order);
|3675|3675| 		this.order = order;
|3676|3676| 		let ret = this.UnitFsm.ProcessMessage(this,
|3677|    |-			{"type": "Order."+this.order.type, "data": this.order.data}
|    |3677|+			{ "type": "Order."+this.order.type, "data": this.order.data}
|3678|3678| 		);
|3679|3679| 
|3680|3680| 		// If the order was rejected then immediately take it off again;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3674|3674| 		this.orderQueue.unshift(order);
|3675|3675| 		this.order = order;
|3676|3676| 		let ret = this.UnitFsm.ProcessMessage(this,
|3677|    |-			{"type": "Order."+this.order.type, "data": this.order.data}
|    |3677|+			{"type": "Order."+this.order.type, "data": this.order.data }
|3678|3678| 		);
|3679|3679| 
|3680|3680| 		// If the order was rejected then immediately take it off again;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3708|3708| 				continue;
|3709|3709| 			if (this.orderQueue[i].type == type)
|3710|3710| 				continue;
|3711|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3711|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3712|3712| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3713|3713| 			return;
|3714|3714| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3708|3708| 				continue;
|3709|3709| 			if (this.orderQueue[i].type == type)
|3710|3710| 				continue;
|3711|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3711|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3712|3712| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3713|3713| 			return;
|3714|3714| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3722|3722| {
|3723|3723| 	// Remember the previous work orders to be able to go back to them later if required
|3724|3724| 	if (data && data.force)
|3725|    |-	{
|    |3725|+	
|3726|3726| 		if (this.IsFormationController())
|3727|3727| 			this.CallMemberFunction("UpdateWorkOrders", [type]);
|3728|3728| 		else
|3729|3729| 			this.UpdateWorkOrders(type);
|3730|    |-	}
|    |3730|+	
|3731|3731| 
|3732|3732| 	let garrisonHolder = this.IsGarrisoned() && type != "Ungarrison" ? this.GetGarrisonHolder() : null;
|3733|3733| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3799|3799| 	{
|3800|3800| 		var cmpUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|3801|3801| 		if (cmpUnitAI)
|3802|    |-		{
|    |3802|+		
|3803|3803| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3804|3804| 			{
|3805|3805| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3808|3808| 					return;
|3809|3809| 				}
|3810|3810| 			}
|3811|    |-		}
|    |3811|+		
|3812|3812| 	}
|3813|3813| 
|3814|3814| 	// If nothing found, take the unit orders
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3801|3801| 		if (cmpUnitAI)
|3802|3802| 		{
|3803|3803| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3804|    |-			{
|    |3804|+			
|3805|3805| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3806|3806| 				{
|3807|3807| 					this.workOrders = cmpUnitAI.orderQueue.slice(i);
|3808|3808| 					return;
|3809|3809| 				}
|3810|    |-			}
|    |3810|+			
|3811|3811| 		}
|3812|3812| 	}
|3813|3813| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3813|3813| 
|3814|3814| 	// If nothing found, take the unit orders
|3815|3815| 	for (var i = 0; i < this.orderQueue.length; ++i)
|3816|    |-	{
|    |3816|+	
|3817|3817| 		if (isWorkType(this.orderQueue[i].type))
|3818|3818| 		{
|3819|3819| 			this.workOrders = this.orderQueue.slice(i);
|3820|3820| 			return;
|3821|3821| 		}
|3822|    |-	}
|    |3822|+	
|3823|3823| };
|3824|3824| 
|3825|3825| UnitAI.prototype.BackToWork = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3879|3879| 	if (data.timerRepeat === undefined)
|3880|3880| 		this.timer = undefined;
|3881|3881| 
|3882|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3882|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3883|3883| };
|3884|3884| 
|3885|3885| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3879|3879| 	if (data.timerRepeat === undefined)
|3880|3880| 		this.timer = undefined;
|3881|3881| 
|3882|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3882|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3883|3883| };
|3884|3884| 
|3885|3885| /**
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3914|3914| 	this.timer = undefined;
|3915|3915| };
|3916|3916| 
|3917|    |-//// Message handlers /////
|    |3917|+// // Message handlers /////
|3918|3918| 
|3919|3919| UnitAI.prototype.OnMotionChanged = function(msg)
|3920|3920| {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3919|3919| UnitAI.prototype.OnMotionChanged = function(msg)
|3920|3920| {
|3921|3921| 	if (msg.starting && !msg.error)
|3922|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|    |3922|+		this.UnitFsm.ProcessMessage(this, { "type": "MoveStarted", "data": msg});
|3923|3923| 	else if (!msg.starting || msg.error)
|3924|3924| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|3925|3925| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3919|3919| UnitAI.prototype.OnMotionChanged = function(msg)
|3920|3920| {
|3921|3921| 	if (msg.starting && !msg.error)
|3922|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|    |3922|+		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg });
|3923|3923| 	else if (!msg.starting || msg.error)
|3924|3924| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|3925|3925| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3921|3921| 	if (msg.starting && !msg.error)
|3922|3922| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|3923|3923| 	else if (!msg.starting || msg.error)
|3924|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|    |3924|+		this.UnitFsm.ProcessMessage(this, { "type": "MoveCompleted", "data": msg});
|3925|3925| };
|3926|3926| 
|3927|3927| UnitAI.prototype.OnGlobalConstructionFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3921|3921| 	if (msg.starting && !msg.error)
|3922|3922| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|3923|3923| 	else if (!msg.starting || msg.error)
|3924|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|    |3924|+		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg });
|3925|3925| };
|3926|3926| 
|3927|3927| UnitAI.prototype.OnGlobalConstructionFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3929|3929| 	// TODO: This is a bit inefficient since every unit listens to every
|3930|3930| 	// construction message - ideally we could scope it to only the one we're building
|3931|3931| 
|3932|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3932|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|3933|3933| };
|3934|3934| 
|3935|3935| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3929|3929| 	// TODO: This is a bit inefficient since every unit listens to every
|3930|3930| 	// construction message - ideally we could scope it to only the one we're building
|3931|3931| 
|3932|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3932|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|3933|3933| };
|3934|3934| 
|3935|3935| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3954|3954| 
|3955|3955| UnitAI.prototype.OnAttacked = function(msg)
|3956|3956| {
|3957|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3957|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|3958|3958| };
|3959|3959| 
|3960|3960| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3954|3954| 
|3955|3955| UnitAI.prototype.OnAttacked = function(msg)
|3956|3956| {
|3957|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3957|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|3958|3958| };
|3959|3959| 
|3960|3960| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3959|3959| 
|3960|3960| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3961|3961| {
|3962|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3962|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|3963|3963| };
|3964|3964| 
|3965|3965| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3959|3959| 
|3960|3960| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3961|3961| {
|3962|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3962|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|3963|3963| };
|3964|3964| 
|3965|3965| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3964|3964| 
|3965|3965| UnitAI.prototype.OnHealthChanged = function(msg)
|3966|3966| {
|3967|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3967|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|3968|3968| };
|3969|3969| 
|3970|3970| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3964|3964| 
|3965|3965| UnitAI.prototype.OnHealthChanged = function(msg)
|3966|3966| {
|3967|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3967|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|3968|3968| };
|3969|3969| 
|3970|3970| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3970|3970| UnitAI.prototype.OnRangeUpdate = function(msg)
|3971|3971| {
|3972|3972| 	if (msg.tag == this.losRangeQuery)
|3973|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3973|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|3974|3974| 	else if (msg.tag == this.losHealRangeQuery)
|3975|3975| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3976|3976| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3970|3970| UnitAI.prototype.OnRangeUpdate = function(msg)
|3971|3971| {
|3972|3972| 	if (msg.tag == this.losRangeQuery)
|3973|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3973|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|3974|3974| 	else if (msg.tag == this.losHealRangeQuery)
|3975|3975| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3976|3976| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3972|3972| 	if (msg.tag == this.losRangeQuery)
|3973|3973| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3974|3974| 	else if (msg.tag == this.losHealRangeQuery)
|3975|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3975|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|3976|3976| };
|3977|3977| 
|3978|3978| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3972|3972| 	if (msg.tag == this.losRangeQuery)
|3973|3973| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3974|3974| 	else if (msg.tag == this.losHealRangeQuery)
|3975|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3975|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|3976|3976| };
|3977|3977| 
|3978|3978| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3977|3977| 
|3978|3978| UnitAI.prototype.OnPackFinished = function(msg)
|3979|3979| {
|3980|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3980|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|3981|3981| };
|3982|3982| 
|3983|3983| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3977|3977| 
|3978|3978| UnitAI.prototype.OnPackFinished = function(msg)
|3979|3979| {
|3980|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3980|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|3981|3981| };
|3982|3982| 
|3983|3983| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3980|3980| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|3981|3981| };
|3982|3982| 
|3983|    |-//// Helper functions to be called by the FSM ////
|    |3983|+// // Helper functions to be called by the FSM ////
|3984|3984| 
|3985|3985| UnitAI.prototype.GetWalkSpeed = function()
|3986|3986| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4084|4084| 	if (!cmpOwnership || cmpOwnership.GetOwner() == INVALID_PLAYER)
|4085|4085| 		return undefined;
|4086|4086| 
|4087|    |-	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position)
|    |4087|+	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
|4088|4088| 	if (!cmpPosition || !cmpPosition.IsInWorld())
|4089|4089| 		return undefined;
|4090|4090| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4169|4169| 			PlaySound(name, member);
|4170|4170| 	}
|4171|4171| 	else
|4172|    |-	{
|    |4172|+	
|4173|4173| 		// Otherwise use our own sounds
|4174|4174| 		PlaySound(name, this.entity);
|4175|    |-	}
|    |4175|+	
|4176|4176| };
|4177|4177| 
|4178|4178| /*
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4356|4356| 	else
|4357|4357| 		// return false? Or hope you come close enough?
|4358|4358| 		var parabolicMaxRange = 0;
|4359|    |-		//return false;
|    |4359|+		// return false;
|4360|4360| 
|4361|4361| 	// the parabole changes while walking, take something in the middle
|4362|4362| 	var guessedMaxRange = (range.max + parabolicMaxRange)/2;
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4421|4421| 	if (this.IsFormationMember())
|4422|4422| 	{
|4423|4423| 		var cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4424|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4425|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4424|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4425|+			cmpFormationUnitAI.order.data.target == target)
|4426|4426| 			return true;
|4427|4427| 	}
|4428|4428| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4541|4541| 	var pos = cmpPosition.GetPosition();
|4542|4542| 	var heldPosition = this.heldPosition;
|4543|4543| 	if (heldPosition === undefined)
|4544|    |-		heldPosition = {"x": pos.x, "z": pos.z};
|    |4544|+		heldPosition = { "x": pos.x, "z": pos.z};
|4545|4545| 
|4546|4546| 	return Math.euclidDistance2D(pos.x, pos.z, heldPosition.x, heldPosition.z) < halfvision + range.max;
|4547|4547| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4541|4541| 	var pos = cmpPosition.GetPosition();
|4542|4542| 	var heldPosition = this.heldPosition;
|4543|4543| 	if (heldPosition === undefined)
|4544|    |-		heldPosition = {"x": pos.x, "z": pos.z};
|    |4544|+		heldPosition = {"x": pos.x, "z": pos.z };
|4545|4545| 
|4546|4546| 	return Math.euclidDistance2D(pos.x, pos.z, heldPosition.x, heldPosition.z) < halfvision + range.max;
|4547|4547| };
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4589|4589| UnitAI.prototype.AttackEntityInZone = function(ents)
|4590|4590| {
|4591|4591| 	var target = ents.find(target =>
|4592|    |-		this.CanAttack(target)
|4593|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4592|+		this.CanAttack(target) &&
|    |4593|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4594|4594| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4595|4595| 	);
|4596|4596| 	if (!target)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4590|4590| {
|4591|4591| 	var target = ents.find(target =>
|4592|4592| 		this.CanAttack(target)
|4593|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4594|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4593|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4594|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4595|4595| 	);
|4596|4596| 	if (!target)
|4597|4597| 		return false;
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4654|4654| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4655|4655| 	if (this.isGuardOf)
|4656|4656| 	{
|4657|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4657|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4658|4658| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4659|4659| 		if (cmpUnitAI && cmpAttack &&
|4660|4660| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4658|4658| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4659|4659| 		if (cmpUnitAI && cmpAttack &&
|4660|4660| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4661|    |-				return false;
|    |4661|+			return false;
|4662|4662| 	}
|4663|4663| 
|4664|4664| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4663|4663| 
|4664|4664| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|4665|4665| 	if (this.GetStance().respondHoldGround)
|4666|    |-	{
|    |4666|+	
|4667|4667| 		if (!this.CheckTargetDistanceFromHeldPosition(target, iid, type))
|4668|4668| 			return true;
|4669|    |-	}
|    |4669|+	
|4670|4670| 
|4671|4671| 	// Stop if it's left our vision range, unless we're especially persistent
|4672|4672| 	if (!this.GetStance().respondChaseBeyondVision)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4670|4670| 
|4671|4671| 	// Stop if it's left our vision range, unless we're especially persistent
|4672|4672| 	if (!this.GetStance().respondChaseBeyondVision)
|4673|    |-	{
|    |4673|+	
|4674|4674| 		if (!this.CheckTargetIsInVisionRange(target))
|4675|4675| 			return true;
|4676|    |-	}
|    |4676|+	
|4677|4677| 
|4678|4678| 	// (Note that CCmpUnitMotion will detect if the target is lost in FoW,
|4679|4679| 	// and will continue moving to its last seen position and then stop)
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4701|4701| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4702|4702| 	if (this.isGuardOf)
|4703|4703| 	{
|4704|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4704|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4705|4705| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4706|4706| 		if (cmpUnitAI && cmpAttack &&
|4707|4707| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4714|4714| 	return false;
|4715|4715| };
|4716|4716| 
|4717|    |-//// External interface functions ////
|    |4717|+// // External interface functions ////
|4718|4718| 
|4719|4719| UnitAI.prototype.SetFormationController = function(ent)
|4720|4720| {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4724|4724| 	// of our own formation (or ourself if not in formation)
|4725|4725| 	var cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
|4726|4726| 	if (cmpObstruction)
|4727|    |-	{
|    |4727|+	
|4728|4728| 		if (ent == INVALID_ENTITY)
|4729|4729| 			cmpObstruction.SetControlGroup(this.entity);
|4730|4730| 		else
|4731|4731| 			cmpObstruction.SetControlGroup(ent);
|4732|    |-	}
|    |4732|+	
|4733|4733| 
|4734|4734| 	// If we were removed from a formation, let the FSM switch back to INDIVIDUAL
|4735|4735| 	if (ent == INVALID_ENTITY)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4867|4867| 	// if we already had an old guard order, do nothing if the target is the same
|4868|4868| 	// and the order is running, otherwise remove the previous order
|4869|4869| 	if (this.isGuardOf)
|4870|    |-	{
|    |4870|+	
|4871|4871| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4872|4872| 			return;
|4873|4873| 		else
|4874|4874| 			this.RemoveGuard();
|4875|    |-	}
|    |4875|+	
|4876|4876| 
|4877|4877| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|4878|4878| };
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4870|4870| 	{
|4871|4871| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4872|4872| 			return;
|4873|    |-		else
|4874|    |-			this.RemoveGuard();
|    |4873|+		this.RemoveGuard();
|4875|4874| 	}
|4876|4875| 
|4877|4876| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4912|4912| 		return;
|4913|4913| 
|4914|4914| 	if (this.order.type == "Guard")
|4915|    |-		this.UnitFsm.ProcessMessage(this, {"type": "RemoveGuard"});
|    |4915|+		this.UnitFsm.ProcessMessage(this, { "type": "RemoveGuard"});
|4916|4916| 	else
|4917|4917| 		for (let i = 1; i < this.orderQueue.length; ++i)
|4918|4918| 			if (this.orderQueue[i].type == "Guard")
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4912|4912| 		return;
|4913|4913| 
|4914|4914| 	if (this.order.type == "Guard")
|4915|    |-		this.UnitFsm.ProcessMessage(this, {"type": "RemoveGuard"});
|    |4915|+		this.UnitFsm.ProcessMessage(this, {"type": "RemoveGuard" });
|4916|4916| 	else
|4917|4917| 		for (let i = 1; i < this.orderQueue.length; ++i)
|4918|4918| 			if (this.orderQueue[i].type == "Guard")
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5041|5041| 			this.WalkToTarget(target, queued);
|5042|5042| 		return;
|5043|5043| 	}
|5044|    |-	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture}, queued);
|    |5044|+	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture }, queued);
|5045|5045| };
|5046|5046| 
|5047|5047| /**
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5190|5190| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5191|5191| 	{
|5192|5192| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5193|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5193|+		if (cmpTrader.HasBothMarkets() &&
|5194|5194| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5195|5195| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5196|5196| 		{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5471|5471| 				{
|5472|5472| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5473|5473| 					var targetClasses = this.order.data.targetClasses;
|5474|    |-					if (targetClasses.attack && cmpIdentity
|5475|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5474|+					if (targetClasses.attack && cmpIdentity &&
|    |5475|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5476|5476| 						continue;
|5477|5477| 					if (targetClasses.avoid && cmpIdentity
|5478|5478| 						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5474|5474| 					if (targetClasses.attack && cmpIdentity
|5475|5475| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5476|5476| 						continue;
|5477|    |-					if (targetClasses.avoid && cmpIdentity
|5478|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5477|+					if (targetClasses.avoid && cmpIdentity &&
|    |5478|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5479|5479| 						continue;
|5480|5480| 					// Only used by the AIs to prevent some choices of targets
|5481|5481| 					if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5497|5497| 		{
|5498|5498| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5499|5499| 			var targetClasses = this.order.data.targetClasses;
|5500|    |-			if (cmpIdentity && targetClasses.attack
|5501|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5500|+			if (cmpIdentity && targetClasses.attack &&
|    |5501|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5502|5502| 				continue;
|5503|5503| 			if (cmpIdentity && targetClasses.avoid
|5504|5504| 				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5500|5500| 			if (cmpIdentity && targetClasses.attack
|5501|5501| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5502|5502| 				continue;
|5503|    |-			if (cmpIdentity && targetClasses.avoid
|5504|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5503|+			if (cmpIdentity && targetClasses.avoid &&
|    |5504|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5505|5505| 				continue;
|5506|5506| 			// Only used by the AIs to prevent some choices of targets
|5507|5507| 			if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5540|5540| 
|5541|5541| 	var cmpRangeManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager);
|5542|5542| 	var entities = cmpRangeManager.ResetActiveQuery(this.losRangeQuery);
|5543|    |-	var targets = entities.filter(function (v) { return cmpAttack.CanAttack(v) && attackfilter(v); })
|    |5543|+	var targets = entities.filter(function(v) { return cmpAttack.CanAttack(v) && attackfilter(v); })
|5544|5544| 		.sort(function (a, b) { return cmpAttack.CompareEntitiesByPreference(a, b); });
|5545|5545| 
|5546|5546| 	return targets;
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5541|5541| 	var cmpRangeManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager);
|5542|5542| 	var entities = cmpRangeManager.ResetActiveQuery(this.losRangeQuery);
|5543|5543| 	var targets = entities.filter(function (v) { return cmpAttack.CanAttack(v) && attackfilter(v); })
|5544|    |-		.sort(function (a, b) { return cmpAttack.CompareEntitiesByPreference(a, b); });
|    |5544|+		.sort(function(a, b) { return cmpAttack.CompareEntitiesByPreference(a, b); });
|5545|5545| 
|5546|5546| 	return targets;
|5547|5547| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5630|5630| 
|5631|5631| UnitAI.prototype.SetHeldPosition = function(x, z)
|5632|5632| {
|5633|    |-	this.heldPosition = {"x": x, "z": z};
|    |5633|+	this.heldPosition = { "x": x, "z": z};
|5634|5634| };
|5635|5635| 
|5636|5636| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5630|5630| 
|5631|5631| UnitAI.prototype.SetHeldPosition = function(x, z)
|5632|5632| {
|5633|    |-	this.heldPosition = {"x": x, "z": z};
|    |5633|+	this.heldPosition = {"x": x, "z": z };
|5634|5634| };
|5635|5635| 
|5636|5636| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5657|5657| 	return false;
|5658|5658| };
|5659|5659| 
|5660|    |-//// Helper functions ////
|    |5660|+// // Helper functions ////
|5661|5661| 
|5662|5662| UnitAI.prototype.CanAttack = function(target)
|5663|5663| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5861|5861| 	return (cmpPack && cmpPack.IsPacking());
|5862|5862| };
|5863|5863| 
|5864|    |-//// Formation specific functions ////
|    |5864|+// // Formation specific functions ////
|5865|5865| 
|5866|5866| UnitAI.prototype.IsAttackingAsFormation = function()
|5867|5867| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5866|5866| UnitAI.prototype.IsAttackingAsFormation = function()
|5867|5867| {
|5868|5868| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|5869|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|5870|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |5869|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |5870|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5871|5871| };
|5872|5872| 
|5873|5873| //// Animal specific functions ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5870|5870| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5871|5871| };
|5872|5872| 
|5873|    |-//// Animal specific functions ////
|    |5873|+// // Animal specific functions ////
|5874|5874| 
|5875|5875| UnitAI.prototype.MoveRandomly = function(distance)
|5876|5876| {

binaries/data/mods/public/simulation/components/UnitAI.js
|2414| »   »   »   »   »   »   let·nearby·=·this.FindNearestDropsite(resourceType.generic);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'nearby' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|3784| »   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
|4576| »   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
|4591| »   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
|4637| »   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
|4660| »   »   ····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
|5121| »   var·lastPos·=·undefined;
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'lastPos' to undefined.

binaries/data/mods/public/simulation/components/UnitAI.js
| 356| »   »   ····&&·(this.lastShorelinePosition.z·==·cmpPosition.GetPosition().z))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|1889| »   »   »   »   »   »   var·cmpFormation·=·Engine.QueryInterface(this.formationController,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2023| »   »   »   »   »   »   &&·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
|2107| »   »   »   »   »   »   »   »   ·&&·((type.generic·==·"treasure"·&&·oldType.generic·==·"treasure")
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2108| »   »   »   »   »   »   »   »   ·||·(type.specific·==·oldType.specific
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2109| »   »   »   »   »   »   »   »   ·&&·(type.specific·!=·"meat"·||·oldTemplate·==·template)))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2132| »   »   »   »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(oldType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2172| »   »   »   »   »   »   »   »   &&·((type.generic·==·"treasure"·&&·oldType.generic·==·"treasure")
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2173| »   »   »   »   »   »   »   »   ||·(type.specific·==·oldType.specific
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2174| »   »   »   »   »   »   »   »   &&·(type.specific·!=·"meat"·||·oldTemplate·==·template)))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2219| »   »   »   »   »   »   »   ||·(type.specific·==·resourceType.specific
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2220| »   »   »   »   »   »   »   &&·(type.specific·!=·"meat"·||·resourceTemplate·==·template))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2236| »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(resourceType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

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

binaries/data/mods/public/simulation/components/UnitAI.js
|2425| »   »   »   »   »   var·nearby·=·this.FindNearbyResource(function·(ent,·type,·template)·{
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2428| »   »   »   »   »   »   »   ||·(type.specific·==·resourceType.specific
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2429| »   »   »   »   »   »   »   &&·(type.specific·!=·"meat"·||·resourceTemplate·==·template))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2449| »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(resourceType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

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

binaries/data/mods/public/simulation/components/UnitAI.js
|2824| »   »   »   »   »   var·cmpResourceDropsite·=·Engine.QueryInterface(msg.data.newentity,·IID_ResourceDropsite);
|    | [NORMAL] JSHintBear:
|    | 'cmpResourceDropsite' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2897| »   »   »   »   »   if·(this.CanGarrison(target))
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2900| »   »   »   »   »   »   if·(this.CheckGarrisonRange(target))
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2902| »   »   »   »   »   »   »   var·cmpGarrisonHolder·=·Engine.QueryInterface(target,·IID_GarrisonHolder);
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2924| »   »   »   »   »   »   »   »   var·cmpResourceDropsite·=·Engine.QueryInterface(target,·IID_ResourceDropsite);
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2925| »   »   »   »   »   »   »   »   if·(cmpResourceDropsite·&&·this.CanReturnResource(target,·true))
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2940| »   »   »   »   »   »   »   »   »   var·cmpHolderPosition·=·Engine.QueryInterface(target,·IID_Position);
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2941| »   »   »   »   »   »   »   »   »   var·cmpHolderUnitAI·=·Engine.QueryInterface(target,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2968| »   »   »   »   »   »   »   if·(this.MoveToTarget(target))
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4087| »   let·cmpPosition·=·Engine.QueryInterface(this.entity,·IID_Position)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/UnitAI.js
|4358| »   »   var·parabolicMaxRange·=·0;
|    | [NORMAL] JSHintBear:
|    | 'parabolicMaxRange' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|4362| »   var·guessedMaxRange·=·(range.max·+·parabolicMaxRange)/2;
|    | [NORMAL] JSHintBear:
|    | 'parabolicMaxRange' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4369| »   return·cmpUnitMotion.MoveToTargetRange(target,·range.min,·Math.min(range.max,·parabolicMaxRange));
|    | [NORMAL] JSHintBear:
|    | 'parabolicMaxRange' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4425| »   »   »   &&·cmpFormationUnitAI.order.data.target·==·target)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|4593| »   »   &&·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
|4594| »   »   &&·(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
|5121| »   var·lastPos·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'lastPos' to 'undefined'.

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|5501| »   »   »   »   &&·!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
|5504| »   »   »   »   &&·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
|5579| »   »   var·range·=·cmpVision.GetRange();
|    | [NORMAL] JSHintBear:
|    | 'range' is already defined.

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|5588| »   »   var·cmpVision·=·Engine.QueryInterface(this.entity,·IID_Vision);
|    | [MAJOR] JSHintBear:
|    | Too many errors. (93% scanned).

Link to build: https://jenkins.wildfiregames.com/job/differential/81/display/redirect

Silier added a comment.EditedFeb 24 2018, 3:16 PM

Looks like formations like phalanx and syntagma are missing walking animations with resources even without this patch, so currently it does not looks like this patch breaks something.

Silier accepted this revision.Feb 24 2018, 3:38 PM
This revision is now accepted and ready to land.Feb 24 2018, 3:38 PM
wraitii accepted this revision.May 16 2018, 7:28 AM
wraitii added a subscriber: wraitii.

These are irrelevant since visualActor overrides this. Likewise in D13. I think I'm removing them there already, so depending I might commit this or close it.

wraitii abandoned this revision.May 26 2019, 2:18 PM

Fixed in D1901