Page MenuHomeWildfire Games

Allow restoring lost wall turrets
Changes PlannedPublic

Authored by Angen on Jan 2 2018, 6:40 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Trac Tickets
#3789
Summary

Currently it's impossible to rebuild a lost wall turret without destroying/rebuilding adjacent wall segments.

Solution in this patch:
When wall tower is destroyed, new entity (slot) is spawned at its position, which is invisible until placing wall.
If player chooses wall as building, slots where can be rebuild tower are displayed.
Placement is snapped to this slots and in this case player can rebuild tower.
To be able to build wall and another segments, tower has to be rebuild first.
These tower slots are destroyed when foundation is placed on them to avoid multiple tower buildings.

Currently when there is some tower slot, any wall tower (even palisade tower) can be build on its place. (now you can rebuild wooden tower with stone tower and join or create mix of different wall types.

Test Plan
  1. Rebuild game
  2. Place wall turret
  3. Destroy turret
  4. Rebuild turret
  5. Destroy turret
  6. Destroy building with territory
  7. Confirm you do not see slot
  8. Build building with territory
  9. Confirm you see slot again
  10. Change perspectives
  11. Confirm you do not see slots that are not in your territory
  12. Reveal map
  13. Confirm you do not see your slots when not placing building
  14. Confirm you do not see slots that are not in your territory
  15. Build anything over slot
  16. Confirm slot is not there anymore

Diff Detail

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

Event Timeline

Angen created this revision.Jan 2 2018, 6:40 PM
Angen updated this revision to Diff 5047.Jan 2 2018, 7:11 PM

white spaces and others

Vulcan added a subscriber: Vulcan.Jan 2 2018, 8:30 PM

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

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
Angen updated this revision to Diff 5058.Jan 2 2018, 11:23 PM
Angen updated this revision to Diff 5060.Jan 2 2018, 11:27 PM

I have got problems after updating versions, sorry for these last 2 commits

Angen updated this revision to Diff 5066.Jan 2 2018, 11:34 PM

cleanup

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

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
Vulcan added a comment.Jan 3 2018, 2:43 AM

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

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
Vulcan added a comment.Jan 3 2018, 4:44 AM

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

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
Vulcan added a comment.Jan 3 2018, 5:48 AM

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

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
Imarok added a subscriber: Imarok.Jan 31 2018, 3:39 PM

Interesting idea, but imho:

  • resurrection of the tower should not be done via upgrade, but by units building/repairing the thing. (That way the enemy can fight against the resurrection by killing the workers)
  • maybe it's possible to let people build over it. (so that it gets auto deleted)
elexis added a subscriber: elexis.Jan 31 2018, 9:03 PM

resurrection of the tower should not be done via upgrade, but by units building/repairing the thing. (That way the enemy can fight against the resurrection by killing the workers)

Not sure if it's really needed, but probably preferable indeed

Needs some thought on capturing, if there is only a turret missing in the captured city, players will want to restore that turret too, right?

I'm mostly not sure it might not be awkward to have so many entities around visibly all the time.
If noone wants to restore the 50 just disappeared wallpieces, it should be possible to not see them.
So I was wondering if they should only be seen if the building preview is active for instance.

Wasn't it originally planned to have clipping? Restoring walls between turrets is possible already, only lost turret positions need to be saved and they ought to become 'snappable'.
(But there could be annoying false-positives too in that situation)

In D1190#51860, @elexis wrote:

Wasn't it originally planned to have clipping? Restoring walls between turrets is possible already, only lost turret positions need to be saved and they ought to become 'snappable'.
(But there could be annoying false-positives too in that situation)

It was, but I guess that's quite difficult to implement...

In D1190#51862, @Imarok wrote:
In D1190#51860, @elexis wrote:

snapping

It was, but I guess that's quite difficult to implement...

Difficult as in looking into the wall placement code rather than not looking into it?
Hint: Search for "snap" in input.js which leads to GUIInterface.GetFoundationSnapData which could likely be extended to look for new local or nonlocal entities that could be rendered with 50% transparency if in wallbuilding mode maybe.

In D1190#51865, @elexis wrote:
In D1190#51862, @Imarok wrote:
In D1190#51860, @elexis wrote:

snapping

It was, but I guess that's quite difficult to implement...

Difficult as in looking into the wall placement code rather than not looking into it?
Hint: Search for "snap" in input.js which leads to GUIInterface.GetFoundationSnapData which could likely be extended to look for new local or nonlocal entities that could be rendered with 50% transparency if in wallbuilding mode maybe.

Ah, ok good idea. I thought you mean letting towers snap to walls without using any extra entities...

Angen abandoned this revision.Nov 9 2018, 12:38 PM

->backlog

Angen reclaimed this revision.Apr 12 2019, 11:10 AM
Angen updated this revision to Diff 7724.Apr 12 2019, 11:31 AM
Angen edited the summary of this revision. (Show Details)
Angen edited the test plan for this revision. (Show Details)

New implementation based on comments above.

Will need cleanup once it is agreed this is good approach.

Owners added subscribers: Restricted Owners Package, Restricted Owners Package.Apr 12 2019, 11:31 AM

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

Linter detected issues:
Executing section Source...

source/simulation2/components/CCmpRangeManager.cpp
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"
Executing section JS...
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|  87|  87| 		// If the elements are still strings, split them by space or by '+'
|  88|  88| 		if (typeof sublist == "string")
|  89|  89| 			sublist = sublist.split(/[+\s]+/);
|  90|    |-		if (sublist.every(c => (c[0] == "!" && classes.indexOf(c.substr(1)) == -1)
|  91|    |-		                    || (c[0] != "!" && classes.indexOf(c) != -1)))
|    |  90|+		if (sublist.every(c => (c[0] == "!" && classes.indexOf(c.substr(1)) == -1) ||
|    |  91|+		                    (c[0] != "!" && classes.indexOf(c) != -1)))
|  92|  92| 			return true;
|  93|  93| 	}
|  94|  94| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 226| 226| 		{
| 227| 227| 			let aura = auraTemplates[auraID];
| 228| 228| 			ret.auras[auraID] = {
| 229|    |-					"name": aura.auraName,
|    | 229|+				"name": aura.auraName,
| 230| 230| 					"description": aura.auraDescription || null,
| 231| 231| 					"radius": aura.radius || null
| 232| 232| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 227| 227| 			let aura = auraTemplates[auraID];
| 228| 228| 			ret.auras[auraID] = {
| 229| 229| 					"name": aura.auraName,
| 230|    |-					"description": aura.auraDescription || null,
|    | 230|+				"description": aura.auraDescription || null,
| 231| 231| 					"radius": aura.radius || null
| 232| 232| 				};
| 233| 233| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 228| 228| 			ret.auras[auraID] = {
| 229| 229| 					"name": aura.auraName,
| 230| 230| 					"description": aura.auraDescription || null,
| 231|    |-					"radius": aura.radius || null
|    | 231|+				"radius": aura.radius || null
| 232| 232| 				};
| 233| 233| 		}
| 234| 234| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 229| 229| 					"name": aura.auraName,
| 230| 230| 					"description": aura.auraDescription || null,
| 231| 231| 					"radius": aura.radius || null
| 232|    |-				};
|    | 232|+			};
| 233| 233| 		}
| 234| 234| 	}
| 235| 235| 

binaries/data/mods/public/globalscripts/Templates.js
|  91| »   »   ····················||·(c[0]·!=·"!"·&&·classes.indexOf(c)·!=·-1)))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Health.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Health.js
| 340| 340| 		cmpSpawnedPosition.JumpTo(pos.x, pos.z);
| 341| 341| 		cmpSpawnedPosition.SetYRotation(rot.y);
| 342| 342| 		cmpSpawnedPosition.SetXZRotation(rot.x, rot.z);
| 343|    |-	} else {
|    | 343|+	} else 
| 344| 344| 		error("entity " + this.template.SpawnSlotOnDeath + " has not position");
| 345|    |-	}
|    | 345|+	
| 346| 346| 	
| 347| 347| 	let cmpVisual = Engine.QueryInterface(spawnedEntity, IID_Visual);
| 348| 348| 	if (cmpVisual) {
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Health.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Health.js
| 343| 343| 	} else {
| 344| 344| 		error("entity " + this.template.SpawnSlotOnDeath + " has not position");
| 345| 345| 	}
| 346|    |-	
|    | 346|+
| 347| 347| 	let cmpVisual = Engine.QueryInterface(spawnedEntity, IID_Visual);
| 348| 348| 	if (cmpVisual) {
| 349| 349| 		cmpVisual.SetShadingColor(0, 1, 0, 1);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Health.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Health.js
| 345| 345| 	}
| 346| 346| 	
| 347| 347| 	let cmpVisual = Engine.QueryInterface(spawnedEntity, IID_Visual);
| 348|    |-	if (cmpVisual) {
|    | 348|+	if (cmpVisual) 
| 349| 349| 		cmpVisual.SetShadingColor(0, 1, 0, 1);
| 350|    |-	}
|    | 350|+	
| 351| 351| 	
| 352| 352| 	let cmpVisibility = Engine.QueryInterface(spawnedEntity, IID_Visibility);
| 353| 353| 	if (cmpVisibility) {
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Health.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Health.js
| 348| 348| 	if (cmpVisual) {
| 349| 349| 		cmpVisual.SetShadingColor(0, 1, 0, 1);
| 350| 350| 	}
| 351|    |-	
|    | 351|+
| 352| 352| 	let cmpVisibility = Engine.QueryInterface(spawnedEntity, IID_Visibility);
| 353| 353| 	if (cmpVisibility) {
| 354| 354| 		cmpVisibility.SetActivated(true);
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Health.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Health.js
| 354| 354| 		cmpVisibility.SetActivated(true);
| 355| 355| 		cmpVisibility.SetHidden(true);
| 356| 356| 	}
| 357|    |-	
|    | 357|+
| 358| 358| 	let cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
| 359| 359| 	let cmpSpawnedObstruction = Engine.QueryInterface(spawnedEntity, IID_Obstruction);
| 360| 360| 	if (cmpObstruction && cmpSpawnedObstruction) {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Health.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Health.js
| 357| 357| 	
| 358| 358| 	let cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
| 359| 359| 	let cmpSpawnedObstruction = Engine.QueryInterface(spawnedEntity, IID_Obstruction);
| 360|    |-	if (cmpObstruction && cmpSpawnedObstruction) {
|    | 360|+	if (cmpObstruction && cmpSpawnedObstruction) 
| 361| 361| 		cmpSpawnedObstruction.SetControlGroup(cmpObstruction.GetControlGroup());
| 362|    |-	}
|    | 362|+	
| 363| 363| 
| 364| 364| 	let cmpOwnership = Engine.QueryInterface(this.entity, IID_Ownership);
| 365| 365| 	let cmpSpawnedOwnership = Engine.QueryInterface(spawnedEntity, IID_Ownership);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Health.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Health.js
| 363| 363| 
| 364| 364| 	let cmpOwnership = Engine.QueryInterface(this.entity, IID_Ownership);
| 365| 365| 	let cmpSpawnedOwnership = Engine.QueryInterface(spawnedEntity, IID_Ownership);
| 366|    |-	if (cmpOwnership && cmpSpawnedOwnership) {
|    | 366|+	if (cmpOwnership && cmpSpawnedOwnership) 
| 367| 367| 		cmpSpawnedOwnership.SetOwner(cmpOwnership.GetOwner());
| 368|    |-	}
|    | 368|+	
| 369| 369| 	
| 370| 370| 	return spawnedEntity;
| 371| 371| }
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Health.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Health.js
| 366| 366| 	if (cmpOwnership && cmpSpawnedOwnership) {
| 367| 367| 		cmpSpawnedOwnership.SetOwner(cmpOwnership.GetOwner());
| 368| 368| 	}
| 369|    |-	
|    | 369|+
| 370| 370| 	return spawnedEntity;
| 371| 371| }
| 372| 372| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Health.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Health.js
| 368| 368| 	}
| 369| 369| 	
| 370| 370| 	return spawnedEntity;
| 371|    |-}
|    | 371|+};
| 372| 372| 
| 373| 373| Health.prototype.CreateDeathSpawnedEntity = function()
| 374| 374| {

binaries/data/mods/public/simulation/components/Health.js
| 337| »   if·(cmpSpawnedPosition)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/Health.js
| 337| »   if·(cmpSpawnedPosition)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/Health.js
| 343| »   }·else·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Closing curly brace appears on the same line as the subsequent block.

binaries/data/mods/public/simulation/components/Health.js
| 348| »   if·(cmpVisual)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/Health.js
| 353| »   if·(cmpVisibility)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/Health.js
| 360| »   if·(cmpObstruction·&&·cmpSpawnedObstruction)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/Health.js
| 366| »   if·(cmpOwnership·&&·cmpSpawnedOwnership)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/Health.js
| 371| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 181| 181| 		}
| 182| 182| 	}
| 183| 183| 	else if (placementSupport.mode === "wall")
| 184|    |-	{
|    | 184|+	
| 185| 185| 		if (placementSupport.wallSet && placementSupport.position)
| 186| 186| 		{
| 187| 187| 			// Fetch an updated list of snapping candidate entities
| 203| 203| 				"snapSlots": placementSupport.wallSlots
| 204| 204| 			});
| 205| 205| 		}
| 206|    |-	}
|    | 206|+	
| 207| 207| 
| 208| 208| 	return false;
| 209| 209| }
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 192| 192| 				true  // include foundations
| 193| 193| 			);
| 194| 194| 			placementSupport.wallSlots = null;
| 195|    |-			if (placementSupport.wallSet.towerSlot) {
|    | 195|+			if (placementSupport.wallSet.towerSlot) 
| 196| 196| 				placementSupport.wallSlots = Engine.GuiInterfaceCall("getSlots", {"player": g_ViewedPlayer});
| 197|    |-			}
|    | 197|+			
| 198| 198| 			return Engine.GuiInterfaceCall("SetWallPlacementPreview", {
| 199| 199| 				"wallSet": placementSupport.wallSet,
| 200| 200| 				"start": placementSupport.position,
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 193| 193| 			);
| 194| 194| 			placementSupport.wallSlots = null;
| 195| 195| 			if (placementSupport.wallSet.towerSlot) {
| 196|    |-				placementSupport.wallSlots = Engine.GuiInterfaceCall("getSlots", {"player": g_ViewedPlayer});
|    | 196|+				placementSupport.wallSlots = Engine.GuiInterfaceCall("getSlots", { "player": g_ViewedPlayer});
| 197| 197| 			}
| 198| 198| 			return Engine.GuiInterfaceCall("SetWallPlacementPreview", {
| 199| 199| 				"wallSet": placementSupport.wallSet,
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 193| 193| 			);
| 194| 194| 			placementSupport.wallSlots = null;
| 195| 195| 			if (placementSupport.wallSet.towerSlot) {
| 196|    |-				placementSupport.wallSlots = Engine.GuiInterfaceCall("getSlots", {"player": g_ViewedPlayer});
|    | 196|+				placementSupport.wallSlots = Engine.GuiInterfaceCall("getSlots", {"player": g_ViewedPlayer });
| 197| 197| 			}
| 198| 198| 			return Engine.GuiInterfaceCall("SetWallPlacementPreview", {
| 199| 199| 				"wallSet": placementSupport.wallSet,
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 292| 292| 	}
| 293| 293| 
| 294| 294| 	if (!updateBuildingPlacementPreview())
| 295|    |-	{
|    | 295|+	
| 296| 296| 		// invalid location - don't build it
| 297| 297| 		// TODO: play a sound?
| 298| 298| 		return false;
| 299|    |-	}
|    | 299|+	
| 300| 300| 
| 301| 301| 	let selection = g_Selection.toList();
| 302| 302| 
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unary word operator 'typeof' must be followed by whitespace.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 331| 331| 	}
| 332| 332| 
| 333| 333| 	let wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 334|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 334|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 335| 335| 	{
| 336| 336| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 337| 337| 		return false;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 359| 359| 	// (this is somewhat non-ideal and hardcode-ish)
| 360| 360| 	let hasWallSegment = false;
| 361| 361| 	for (let piece of cmd.pieces)
| 362|    |-	{
|    | 362|+	
| 363| 363| 		if (piece.template != cmd.wallSet.templates.tower) // TODO: hardcode-ish :(
| 364| 364| 		{
| 365| 365| 			hasWallSegment = true;
| 366| 366| 			break;
| 367| 367| 		}
| 368|    |-	}
|    | 368|+	
| 369| 369| 
| 370| 370| 	if (hasWallSegment || cmd.rebuildStartTower)
| 371| 371| 	{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 482| 482| 	mouseIsOverObject = (hoveredObject != null);
| 483| 483| 
| 484| 484| 	// Close the menu when interacting with the game world
| 485|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 486|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 485|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 486|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 487| 487| 		closeMenu();
| 488| 488| 
| 489| 489| 	// State-machine processing:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 523| 523| 
| 524| 524| 				// Update the list of selected units
| 525| 525| 				if (Engine.HotkeyIsPressed("selection.add"))
| 526|    |-				{
|    | 526|+				
| 527| 527| 					g_Selection.addList(ents);
| 528|    |-				}
|    | 528|+				
| 529| 529| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 530| 530| 				{
| 531| 531| 					g_Selection.removeList(ents);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 527| 527| 					g_Selection.addList(ents);
| 528| 528| 				}
| 529| 529| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 530|    |-				{
|    | 530|+				
| 531| 531| 					g_Selection.removeList(ents);
| 532|    |-				}
|    | 532|+				
| 533| 533| 				else
| 534| 534| 				{
| 535| 535| 					g_Selection.reset();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 583| 583| 				// If shift is down, let the player continue placing another of the same building
| 584| 584| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 585| 585| 				if (tryPlaceBuilding(queued))
| 586|    |-				{
|    | 586|+				
| 587| 587| 					if (queued)
| 588| 588| 						inputState = INPUT_BUILDING_PLACEMENT;
| 589| 589| 					else
| 590| 590| 						inputState = INPUT_NORMAL;
| 591|    |-				}
|    | 591|+				
| 592| 592| 				else
| 593| 593| 				{
| 594| 594| 					inputState = INPUT_BUILDING_PLACEMENT;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 590| 590| 						inputState = INPUT_NORMAL;
| 591| 591| 				}
| 592| 592| 				else
| 593|    |-				{
|    | 593|+				
| 594| 594| 					inputState = INPUT_BUILDING_PLACEMENT;
| 595|    |-				}
|    | 595|+				
| 596| 596| 				return true;
| 597| 597| 			}
| 598| 598| 			break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 643| 643| 		// user to continue building walls.
| 644| 644| 		switch (ev.type)
| 645| 645| 		{
| 646|    |-			case "mousemotion":
|    | 646|+		case "mousemotion":
| 647| 647| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 648| 648| 
| 649| 649| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 644| 644| 		switch (ev.type)
| 645| 645| 		{
| 646| 646| 			case "mousemotion":
| 647|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 647|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 648| 648| 
| 649| 649| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 650| 650| 				// the ending point and the starting point to snap to.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 646| 646| 			case "mousemotion":
| 647| 647| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 648| 648| 
| 649|    |-				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 649|+			// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 650| 650| 				// the ending point and the starting point to snap to.
| 651| 651| 				//
| 652| 652| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 647| 647| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 648| 648| 
| 649| 649| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 650|    |-				// the ending point and the starting point to snap to.
|    | 650|+			// the ending point and the starting point to snap to.
| 651| 651| 				//
| 652| 652| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 653| 653| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 648| 648| 
| 649| 649| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 650| 650| 				// the ending point and the starting point to snap to.
| 651|    |-				//
|    | 651|+			//
| 652| 652| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 653| 653| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 654| 654| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 649| 649| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 650| 650| 				// the ending point and the starting point to snap to.
| 651| 651| 				//
| 652|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 652|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 653| 653| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 654| 654| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 655| 655| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 650| 650| 				// the ending point and the starting point to snap to.
| 651| 651| 				//
| 652| 652| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 653|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 653|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 654| 654| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 655| 655| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 656| 656| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 651| 651| 				//
| 652| 652| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 653| 653| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 654|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 654|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 655| 655| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 656| 656| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 657| 657| 				// points.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 652| 652| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 653| 653| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 654| 654| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 655|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 655|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 656| 656| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 657| 657| 				// points.
| 658| 658| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 653| 653| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 654| 654| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 655| 655| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 656|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 656|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 657| 657| 				// points.
| 658| 658| 
| 659| 659| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 654| 654| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 655| 655| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 656| 656| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 657|    |-				// points.
|    | 657|+			// points.
| 658| 658| 
| 659| 659| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 660| 660| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 656| 656| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 657| 657| 				// points.
| 658| 658| 
| 659|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 659|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 660| 660| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 661| 661| 
| 662| 662| 				if (result && result.cost)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 657| 657| 				// points.
| 658| 658| 
| 659| 659| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 660|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 660|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 661| 661| 
| 662| 662| 				if (result && result.cost)
| 663| 663| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 659| 659| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 660| 660| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 661| 661| 
| 662|    |-				if (result && result.cost)
|    | 662|+			if (result && result.cost)
| 663| 663| 				{
| 664| 664| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 665| 665| 					placementSupport.tooltipMessage = [
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 660| 660| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 661| 661| 
| 662| 662| 				if (result && result.cost)
| 663|    |-				{
|    | 663|+			{
| 664| 664| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 665| 665| 					placementSupport.tooltipMessage = [
| 666| 666| 						getEntityCostTooltip(result),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 661| 661| 
| 662| 662| 				if (result && result.cost)
| 663| 663| 				{
| 664|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 664|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 665| 665| 					placementSupport.tooltipMessage = [
| 666| 666| 						getEntityCostTooltip(result),
| 667| 667| 						getNeededResourcesTooltip(neededResources)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 662| 662| 				if (result && result.cost)
| 663| 663| 				{
| 664| 664| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 665|    |-					placementSupport.tooltipMessage = [
|    | 665|+				placementSupport.tooltipMessage = [
| 666| 666| 						getEntityCostTooltip(result),
| 667| 667| 						getNeededResourcesTooltip(neededResources)
| 668| 668| 					].filter(tip => tip).join("\n");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 663| 663| 				{
| 664| 664| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 665| 665| 					placementSupport.tooltipMessage = [
| 666|    |-						getEntityCostTooltip(result),
|    | 666|+					getEntityCostTooltip(result),
| 667| 667| 						getNeededResourcesTooltip(neededResources)
| 668| 668| 					].filter(tip => tip).join("\n");
| 669| 669| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 664| 664| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 665| 665| 					placementSupport.tooltipMessage = [
| 666| 666| 						getEntityCostTooltip(result),
| 667|    |-						getNeededResourcesTooltip(neededResources)
|    | 667|+					getNeededResourcesTooltip(neededResources)
| 668| 668| 					].filter(tip => tip).join("\n");
| 669| 669| 				}
| 670| 670| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 665| 665| 					placementSupport.tooltipMessage = [
| 666| 666| 						getEntityCostTooltip(result),
| 667| 667| 						getNeededResourcesTooltip(neededResources)
| 668|    |-					].filter(tip => tip).join("\n");
|    | 668|+				].filter(tip => tip).join("\n");
| 669| 669| 				}
| 670| 670| 
| 671| 671| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 666| 666| 						getEntityCostTooltip(result),
| 667| 667| 						getNeededResourcesTooltip(neededResources)
| 668| 668| 					].filter(tip => tip).join("\n");
| 669|    |-				}
|    | 669|+			}
| 670| 670| 
| 671| 671| 				break;
| 672| 672| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 668| 668| 					].filter(tip => tip).join("\n");
| 669| 669| 				}
| 670| 670| 
| 671|    |-				break;
|    | 671|+			break;
| 672| 672| 
| 673| 673| 			case "mousebuttondown":
| 674| 674| 				if (ev.button == SDL_BUTTON_LEFT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 670| 670| 
| 671| 671| 				break;
| 672| 672| 
| 673|    |-			case "mousebuttondown":
|    | 673|+		case "mousebuttondown":
| 674| 674| 				if (ev.button == SDL_BUTTON_LEFT)
| 675| 675| 				{
| 676| 676| 					var queued = Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 671| 671| 				break;
| 672| 672| 
| 673| 673| 			case "mousebuttondown":
| 674|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 674|+			if (ev.button == SDL_BUTTON_LEFT)
| 675| 675| 				{
| 676| 676| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 677| 677| 					if (tryPlaceWall(queued))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 672| 672| 
| 673| 673| 			case "mousebuttondown":
| 674| 674| 				if (ev.button == SDL_BUTTON_LEFT)
| 675|    |-				{
|    | 675|+			{
| 676| 676| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 677| 677| 					if (tryPlaceWall(queued))
| 678| 678| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 673| 673| 			case "mousebuttondown":
| 674| 674| 				if (ev.button == SDL_BUTTON_LEFT)
| 675| 675| 				{
| 676|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 676|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 677| 677| 					if (tryPlaceWall(queued))
| 678| 678| 					{
| 679| 679| 						if (queued)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 674| 674| 				if (ev.button == SDL_BUTTON_LEFT)
| 675| 675| 				{
| 676| 676| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 677|    |-					if (tryPlaceWall(queued))
|    | 677|+				if (tryPlaceWall(queued))
| 678| 678| 					{
| 679| 679| 						if (queued)
| 680| 680| 						{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 675| 675| 				{
| 676| 676| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 677| 677| 					if (tryPlaceWall(queued))
| 678|    |-					{
|    | 678|+					
| 679| 679| 						if (queued)
| 680| 680| 						{
| 681| 681| 							// continue building, just set a new starting position where we left off
| 690| 690| 							inputState = INPUT_NORMAL;
| 691| 691| 							Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
| 692| 692| 						}
| 693|    |-					}
|    | 693|+					
| 694| 694| 					else
| 695| 695| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 696| 696| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 675| 675| 				{
| 676| 676| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 677| 677| 					if (tryPlaceWall(queued))
| 678|    |-					{
|    | 678|+				{
| 679| 679| 						if (queued)
| 680| 680| 						{
| 681| 681| 							// continue building, just set a new starting position where we left off
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 676| 676| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 677| 677| 					if (tryPlaceWall(queued))
| 678| 678| 					{
| 679|    |-						if (queued)
|    | 679|+					if (queued)
| 680| 680| 						{
| 681| 681| 							// continue building, just set a new starting position where we left off
| 682| 682| 							placementSupport.position = placementSupport.wallEndPosition;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 677| 677| 					if (tryPlaceWall(queued))
| 678| 678| 					{
| 679| 679| 						if (queued)
| 680|    |-						{
|    | 680|+					{
| 681| 681| 							// continue building, just set a new starting position where we left off
| 682| 682| 							placementSupport.position = placementSupport.wallEndPosition;
| 683| 683| 							placementSupport.wallEndPosition = undefined;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 678| 678| 					{
| 679| 679| 						if (queued)
| 680| 680| 						{
| 681|    |-							// continue building, just set a new starting position where we left off
|    | 681|+						// continue building, just set a new starting position where we left off
| 682| 682| 							placementSupport.position = placementSupport.wallEndPosition;
| 683| 683| 							placementSupport.wallEndPosition = undefined;
| 684| 684| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 679| 679| 						if (queued)
| 680| 680| 						{
| 681| 681| 							// continue building, just set a new starting position where we left off
| 682|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 682|+						placementSupport.position = placementSupport.wallEndPosition;
| 683| 683| 							placementSupport.wallEndPosition = undefined;
| 684| 684| 
| 685| 685| 							inputState = INPUT_BUILDING_WALL_CLICK;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 680| 680| 						{
| 681| 681| 							// continue building, just set a new starting position where we left off
| 682| 682| 							placementSupport.position = placementSupport.wallEndPosition;
| 683|    |-							placementSupport.wallEndPosition = undefined;
|    | 683|+						placementSupport.wallEndPosition = undefined;
| 684| 684| 
| 685| 685| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 686| 686| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 682| 682| 							placementSupport.position = placementSupport.wallEndPosition;
| 683| 683| 							placementSupport.wallEndPosition = undefined;
| 684| 684| 
| 685|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 685|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 686| 686| 						}
| 687| 687| 						else
| 688| 688| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 683| 683| 							placementSupport.wallEndPosition = undefined;
| 684| 684| 
| 685| 685| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 686|    |-						}
|    | 686|+					}
| 687| 687| 						else
| 688| 688| 						{
| 689| 689| 							placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 684| 684| 
| 685| 685| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 686| 686| 						}
| 687|    |-						else
|    | 687|+					else
| 688| 688| 						{
| 689| 689| 							placementSupport.Reset();
| 690| 690| 							inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 685| 685| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 686| 686| 						}
| 687| 687| 						else
| 688|    |-						{
|    | 688|+					{
| 689| 689| 							placementSupport.Reset();
| 690| 690| 							inputState = INPUT_NORMAL;
| 691| 691| 							Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 686| 686| 						}
| 687| 687| 						else
| 688| 688| 						{
| 689|    |-							placementSupport.Reset();
|    | 689|+						placementSupport.Reset();
| 690| 690| 							inputState = INPUT_NORMAL;
| 691| 691| 							Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
| 692| 692| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 687| 687| 						else
| 688| 688| 						{
| 689| 689| 							placementSupport.Reset();
| 690|    |-							inputState = INPUT_NORMAL;
|    | 690|+						inputState = INPUT_NORMAL;
| 691| 691| 							Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
| 692| 692| 						}
| 693| 693| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 688| 688| 						{
| 689| 689| 							placementSupport.Reset();
| 690| 690| 							inputState = INPUT_NORMAL;
| 691|    |-							Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
|    | 691|+						Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
| 692| 692| 						}
| 693| 693| 					}
| 694| 694| 					else
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 688| 688| 						{
| 689| 689| 							placementSupport.Reset();
| 690| 690| 							inputState = INPUT_NORMAL;
| 691|    |-							Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
|    | 691|+							Engine.GuiInterfaceCall("SetSlotVisibility", { "player": g_ViewedPlayer, "active": false});
| 692| 692| 						}
| 693| 693| 					}
| 694| 694| 					else
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 688| 688| 						{
| 689| 689| 							placementSupport.Reset();
| 690| 690| 							inputState = INPUT_NORMAL;
| 691|    |-							Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
|    | 691|+							Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false });
| 692| 692| 						}
| 693| 693| 					}
| 694| 694| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 689| 689| 							placementSupport.Reset();
| 690| 690| 							inputState = INPUT_NORMAL;
| 691| 691| 							Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
| 692|    |-						}
|    | 692|+					}
| 693| 693| 					}
| 694| 694| 					else
| 695| 695| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 690| 690| 							inputState = INPUT_NORMAL;
| 691| 691| 							Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
| 692| 692| 						}
| 693|    |-					}
|    | 693|+				}
| 694| 694| 					else
| 695| 695| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 696| 696| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 691| 691| 							Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
| 692| 692| 						}
| 693| 693| 					}
| 694|    |-					else
|    | 694|+				else
| 695| 695| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 696| 696| 
| 697| 697| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 692| 692| 						}
| 693| 693| 					}
| 694| 694| 					else
| 695|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 695|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 696| 696| 
| 697| 697| 					updateBuildingPlacementPreview();
| 698| 698| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 694| 694| 					else
| 695| 695| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 696| 696| 
| 697|    |-					updateBuildingPlacementPreview();
|    | 697|+				updateBuildingPlacementPreview();
| 698| 698| 					return true;
| 699| 699| 				}
| 700| 700| 				else if (ev.button == SDL_BUTTON_RIGHT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 695| 695| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 696| 696| 
| 697| 697| 					updateBuildingPlacementPreview();
| 698|    |-					return true;
|    | 698|+				return true;
| 699| 699| 				}
| 700| 700| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 701| 701| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 696| 696| 
| 697| 697| 					updateBuildingPlacementPreview();
| 698| 698| 					return true;
| 699|    |-				}
|    | 699|+			}
| 700| 700| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 701| 701| 				{
| 702| 702| 					
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 697| 697| 					updateBuildingPlacementPreview();
| 698| 698| 					return true;
| 699| 699| 				}
| 700|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 700|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 701| 701| 				{
| 702| 702| 					
| 703| 703| 					Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 698| 698| 					return true;
| 699| 699| 				}
| 700| 700| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 701|    |-				{
|    | 701|+			{
| 702| 702| 					
| 703| 703| 					Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
| 704| 704| 					// reset to normal input mode
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 699| 699| 				}
| 700| 700| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 701| 701| 				{
| 702|    |-					
|    | 702|+
| 703| 703| 					Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
| 704| 704| 					// reset to normal input mode
| 705| 705| 					placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 700| 700| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 701| 701| 				{
| 702| 702| 					
| 703|    |-					Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
|    | 703|+				Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
| 704| 704| 					// reset to normal input mode
| 705| 705| 					placementSupport.Reset();
| 706| 706| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 700| 700| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 701| 701| 				{
| 702| 702| 					
| 703|    |-					Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
|    | 703|+					Engine.GuiInterfaceCall("SetSlotVisibility", { "player": g_ViewedPlayer, "active": false});
| 704| 704| 					// reset to normal input mode
| 705| 705| 					placementSupport.Reset();
| 706| 706| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 700| 700| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 701| 701| 				{
| 702| 702| 					
| 703|    |-					Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
|    | 703|+					Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false });
| 704| 704| 					// reset to normal input mode
| 705| 705| 					placementSupport.Reset();
| 706| 706| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 701| 701| 				{
| 702| 702| 					
| 703| 703| 					Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
| 704|    |-					// reset to normal input mode
|    | 704|+				// reset to normal input mode
| 705| 705| 					placementSupport.Reset();
| 706| 706| 					updateBuildingPlacementPreview();
| 707| 707| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 702| 702| 					
| 703| 703| 					Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
| 704| 704| 					// reset to normal input mode
| 705|    |-					placementSupport.Reset();
|    | 705|+				placementSupport.Reset();
| 706| 706| 					updateBuildingPlacementPreview();
| 707| 707| 
| 708| 708| 					inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 703| 703| 					Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
| 704| 704| 					// reset to normal input mode
| 705| 705| 					placementSupport.Reset();
| 706|    |-					updateBuildingPlacementPreview();
|    | 706|+				updateBuildingPlacementPreview();
| 707| 707| 
| 708| 708| 					inputState = INPUT_NORMAL;
| 709| 709| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 705| 705| 					placementSupport.Reset();
| 706| 706| 					updateBuildingPlacementPreview();
| 707| 707| 
| 708|    |-					inputState = INPUT_NORMAL;
|    | 708|+				inputState = INPUT_NORMAL;
| 709| 709| 					return true;
| 710| 710| 				}
| 711| 711| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 706| 706| 					updateBuildingPlacementPreview();
| 707| 707| 
| 708| 708| 					inputState = INPUT_NORMAL;
| 709|    |-					return true;
|    | 709|+				return true;
| 710| 710| 				}
| 711| 711| 				break;
| 712| 712| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 707| 707| 
| 708| 708| 					inputState = INPUT_NORMAL;
| 709| 709| 					return true;
| 710|    |-				}
|    | 710|+			}
| 711| 711| 				break;
| 712| 712| 		}
| 713| 713| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 708| 708| 					inputState = INPUT_NORMAL;
| 709| 709| 					return true;
| 710| 710| 				}
| 711|    |-				break;
|    | 711|+			break;
| 712| 712| 		}
| 713| 713| 		break;
| 714| 714| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 718| 718| 		case "mousemotion":
| 719| 719| 			let maxDragDelta = 16;
| 720| 720| 			if (g_DragStart.distanceTo(ev) >= maxDragDelta)
| 721|    |-			{
|    | 721|+			
| 722| 722| 				// Rotate in the direction of the mouse
| 723| 723| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 724|    |-			}
|    | 724|+			
| 725| 725| 			else
| 726| 726| 			{
| 727| 727| 				// If the mouse is near the center, snap back to the default orientation
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 723| 723| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 724| 724| 			}
| 725| 725| 			else
| 726|    |-			{
|    | 726|+			
| 727| 727| 				// If the mouse is near the center, snap back to the default orientation
| 728| 728| 				placementSupport.SetDefaultAngle();
| 729|    |-			}
|    | 729|+			
| 730| 730| 
| 731| 731| 			var snapData = Engine.GuiInterfaceCall("GetFoundationSnapData", {
| 732| 732| 				"template": placementSupport.template,
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 749| 749| 				// If shift is down, let the player continue placing another of the same building
| 750| 750| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 751| 751| 				if (tryPlaceBuilding(queued))
| 752|    |-				{
|    | 752|+				
| 753| 753| 					if (queued)
| 754| 754| 						inputState = INPUT_BUILDING_PLACEMENT;
| 755| 755| 					else
| 756| 756| 						inputState = INPUT_NORMAL;
| 757|    |-				}
|    | 757|+				
| 758| 758| 				else
| 759| 759| 				{
| 760| 760| 					inputState = INPUT_BUILDING_PLACEMENT;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 756| 756| 						inputState = INPUT_NORMAL;
| 757| 757| 				}
| 758| 758| 				else
| 759|    |-				{
|    | 759|+				
| 760| 760| 					inputState = INPUT_BUILDING_PLACEMENT;
| 761|    |-				}
|    | 761|+				
| 762| 762| 				return true;
| 763| 763| 			}
| 764| 764| 			break;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 805| 805| 
| 806| 806| 	// Handle the time-warp testing features, restricted to single-player
| 807| 807| 	if (!g_IsNetworked && Engine.GetGUIObjectByName("devTimeWarp").checked)
| 808|    |-	{
|    | 808|+	
| 809| 809| 		if (ev.type == "hotkeydown" && ev.hotkey == "session.timewarp.fastforward")
| 810| 810| 			Engine.SetSimRate(20.0);
| 811| 811| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.fastforward")
| 812| 812| 			Engine.SetSimRate(1.0);
| 813| 813| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.rewind")
| 814| 814| 			Engine.RewindTimeWarp();
| 815|    |-	}
|    | 815|+	
| 816| 816| 
| 817| 817| 	if (ev.hotkey == "session.highlightguarding")
| 818| 818| 	{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 864| 864| 			break;
| 865| 865| 
| 866| 866| 		case "hotkeydown":
| 867|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 867|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 868| 868| 				{
| 869| 869| 					let now = Date.now();
| 870| 870| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 865| 865| 
| 866| 866| 		case "hotkeydown":
| 867| 867| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 868|    |-				{
|    | 868|+			{
| 869| 869| 					let now = Date.now();
| 870| 870| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 871| 871| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 866| 866| 		case "hotkeydown":
| 867| 867| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 868| 868| 				{
| 869|    |-					let now = Date.now();
|    | 869|+				let now = Date.now();
| 870| 870| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 871| 871| 					{
| 872| 872| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 867| 867| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 868| 868| 				{
| 869| 869| 					let now = Date.now();
| 870|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 870|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 871| 871| 					{
| 872| 872| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 873| 873| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 868| 868| 				{
| 869| 869| 					let now = Date.now();
| 870| 870| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 871|    |-					{
|    | 871|+				{
| 872| 872| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 873| 873| 						{
| 874| 874| 							var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 869| 869| 					let now = Date.now();
| 870| 870| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 871| 871| 					{
| 872|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 872|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 873| 873| 						{
| 874| 874| 							var sptr = ev.hotkey.split(".");
| 875| 875| 							performGroup("snap", sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 870| 870| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 871| 871| 					{
| 872| 872| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 873|    |-						{
|    | 873|+					{
| 874| 874| 							var sptr = ev.hotkey.split(".");
| 875| 875| 							performGroup("snap", sptr[3]);
| 876| 876| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 871| 871| 					{
| 872| 872| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 873| 873| 						{
| 874|    |-							var sptr = ev.hotkey.split(".");
|    | 874|+						var sptr = ev.hotkey.split(".");
| 875| 875| 							performGroup("snap", sptr[3]);
| 876| 876| 						}
| 877| 877| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 872| 872| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 873| 873| 						{
| 874| 874| 							var sptr = ev.hotkey.split(".");
| 875|    |-							performGroup("snap", sptr[3]);
|    | 875|+						performGroup("snap", sptr[3]);
| 876| 876| 						}
| 877| 877| 					}
| 878| 878| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 873| 873| 						{
| 874| 874| 							var sptr = ev.hotkey.split(".");
| 875| 875| 							performGroup("snap", sptr[3]);
| 876|    |-						}
|    | 876|+					}
| 877| 877| 					}
| 878| 878| 					else
| 879| 879| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 874| 874| 							var sptr = ev.hotkey.split(".");
| 875| 875| 							performGroup("snap", sptr[3]);
| 876| 876| 						}
| 877|    |-					}
|    | 877|+				}
| 878| 878| 					else
| 879| 879| 					{
| 880| 880| 						var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 875| 875| 							performGroup("snap", sptr[3]);
| 876| 876| 						}
| 877| 877| 					}
| 878|    |-					else
|    | 878|+				else
| 879| 879| 					{
| 880| 880| 						var sptr = ev.hotkey.split(".");
| 881| 881| 						performGroup(sptr[2], sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 876| 876| 						}
| 877| 877| 					}
| 878| 878| 					else
| 879|    |-					{
|    | 879|+				{
| 880| 880| 						var sptr = ev.hotkey.split(".");
| 881| 881| 						performGroup(sptr[2], sptr[3]);
| 882| 882| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 877| 877| 					}
| 878| 878| 					else
| 879| 879| 					{
| 880|    |-						var sptr = ev.hotkey.split(".");
|    | 880|+					var sptr = ev.hotkey.split(".");
| 881| 881| 						performGroup(sptr[2], sptr[3]);
| 882| 882| 
| 883| 883| 						doublePressTimer = now;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 878| 878| 					else
| 879| 879| 					{
| 880| 880| 						var sptr = ev.hotkey.split(".");
| 881|    |-						performGroup(sptr[2], sptr[3]);
|    | 881|+					performGroup(sptr[2], sptr[3]);
| 882| 882| 
| 883| 883| 						doublePressTimer = now;
| 884| 884| 						prevHotkey = ev.hotkey;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 880| 880| 						var sptr = ev.hotkey.split(".");
| 881| 881| 						performGroup(sptr[2], sptr[3]);
| 882| 882| 
| 883|    |-						doublePressTimer = now;
|    | 883|+					doublePressTimer = now;
| 884| 884| 						prevHotkey = ev.hotkey;
| 885| 885| 					}
| 886| 886| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 881| 881| 						performGroup(sptr[2], sptr[3]);
| 882| 882| 
| 883| 883| 						doublePressTimer = now;
| 884|    |-						prevHotkey = ev.hotkey;
|    | 884|+					prevHotkey = ev.hotkey;
| 885| 885| 					}
| 886| 886| 				}
| 887| 887| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 882| 882| 
| 883| 883| 						doublePressTimer = now;
| 884| 884| 						prevHotkey = ev.hotkey;
| 885|    |-					}
|    | 885|+				}
| 886| 886| 				}
| 887| 887| 				break;
| 888| 888| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 883| 883| 						doublePressTimer = now;
| 884| 884| 						prevHotkey = ev.hotkey;
| 885| 885| 					}
| 886|    |-				}
|    | 886|+			}
| 887| 887| 				break;
| 888| 888| 		}
| 889| 889| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 884| 884| 						prevHotkey = ev.hotkey;
| 885| 885| 					}
| 886| 886| 				}
| 887|    |-				break;
|    | 887|+			break;
| 888| 888| 		}
| 889| 889| 		break;
| 890| 890| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1052|1052| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1053|1053| 
|1054|1054| 			if (placementSupport.mode === "wall")
|1055|    |-			{
|    |1055|+			
|1056|1056| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1057|1057| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1058|1058| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1059|1059| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1060|    |-			}
|    |1060|+			
|1061|1061| 			else
|1062|1062| 			{
|1063|1063| 				// cancel if not enough resources
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1104|1104| 			else if (ev.button == SDL_BUTTON_RIGHT)
|1105|1105| 			{
|1106|1106| 				// Cancel building
|1107|    |-				Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
|    |1107|+				Engine.GuiInterfaceCall("SetSlotVisibility", { "player": g_ViewedPlayer, "active": false});
|1108|1108| 				placementSupport.Reset();
|1109|1109| 				inputState = INPUT_NORMAL;
|1110|1110| 				return true;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1104|1104| 			else if (ev.button == SDL_BUTTON_RIGHT)
|1105|1105| 			{
|1106|1106| 				// Cancel building
|1107|    |-				Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false});
|    |1107|+				Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": false });
|1108|1108| 				placementSupport.Reset();
|1109|1109| 				inputState = INPUT_NORMAL;
|1110|1110| 				return true;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1318|1318| 		placementSupport.mode = "wall";
|1319|1319| 		placementSupport.wallSet = templateData.wallSet;
|1320|1320| 		inputState = INPUT_BUILDING_PLACEMENT;
|1321|    |-		Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": true});
|    |1321|+		Engine.GuiInterfaceCall("SetSlotVisibility", { "player": g_ViewedPlayer, "active": true});
|1322|1322| 	}
|1323|1323| 	else
|1324|1324| 	{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1318|1318| 		placementSupport.mode = "wall";
|1319|1319| 		placementSupport.wallSet = templateData.wallSet;
|1320|1320| 		inputState = INPUT_BUILDING_PLACEMENT;
|1321|    |-		Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": true});
|    |1321|+		Engine.GuiInterfaceCall("SetSlotVisibility", {"player": g_ViewedPlayer, "active": true });
|1322|1322| 	}
|1323|1323| 	else
|1324|1324| 	{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1330|1330| 	if (templateData.attack &&
|1331|1331| 		templateData.attack.Ranged &&
|1332|1332| 		templateData.attack.Ranged.maxRange)
|1333|    |-	{
|    |1333|+	
|1334|1334| 		// add attack information to display a good tooltip
|1335|1335| 		placementSupport.attack = templateData.attack;
|1336|    |-	}
|    |1336|+	
|1337|1337| }
|1338|1338| 
|1339|1339| // Batch training:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1414|1414| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1415|1415| 	{
|1416|1416| 		if (inputState == INPUT_BATCHTRAINING)
|1417|    |-		{
|    |1417|+		
|1418|1418| 			// Check if we are training in the same building(s) as the last batch
|1419|1419| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1420|1420| 			// If the order changed, we have a new selection and we should create a new batch.
|1447|1447| 			else if (!decrement)
|1448|1448| 				flushTrainingBatch();
|1449|1449| 				// fall through to create the new batch
|1450|    |-		}
|    |1450|+		
|1451|1451| 
|1452|1452| 		// Don't start a new batch if decrementing or unable to afford it.
|1453|1453| 		if (decrement || Engine.GuiInterfaceCall("GetNeededResources", { "cost":
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1446|1446| 			// Otherwise start a new one
|1447|1447| 			else if (!decrement)
|1448|1448| 				flushTrainingBatch();
|1449|    |-				// fall through to create the new batch
|    |1449|+			// fall through to create the new batch
|1450|1450| 		}
|1451|1451| 
|1452|1452| 		// Don't start a new batch if decrementing or unable to afford it.
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1524|1524| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1525|1525| 	{
|1526|1526| 		// Train as many full batches as we can
|1527|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1527|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1528|1528| 		Engine.PostNetworkCommand({
|1529|1529| 			"type": "train",
|1530|1530| 			"entities": appropriateBuildings.slice(0, buildingsCountToTrainFullBatch),
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1603|1603| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1604|1604| 
|1605|1605| 	// Reset the last idle unit, etc., if the selection type has changed.
|1606|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1606|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1607|1607| 		resetIdleUnit();
|1608|1608| 	lastIdleClasses = classes;
|1609|1609| 

binaries/data/mods/public/gui/session/input.js
| 195| »   »   »   if·(placementSupport.wallSet.towerSlot)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/gui/session/input.js
| 232| »   »   var·entState·=·GetEntityState(ent);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'entState' is already declared in the upper scope.

binaries/data/mods/public/gui/session/input.js
| 239| »   var·target·=·undefined;
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'target' to undefined.

binaries/data/mods/public/gui/session/input.js
| 253| »   var·actionInfo·=·undefined;
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'actionInfo' to undefined.

binaries/data/mods/public/gui/session/input.js
| 471| »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 498| »   switch·(inputState)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 502| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 557| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 567| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 615| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 644| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 716| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 833| »   switch·(inputState)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 836| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 936| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1025| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1039| »   »   »   »   let·action·=·determineAction(ev.x,·ev.y);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'action' is already declared in the upper scope.

binaries/data/mods/public/gui/session/input.js
|1048| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1118| »   »   »   switch·(ev.hotkey)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1554| »   switch·(action)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 239| »   var·target·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'target' to 'undefined'.

binaries/data/mods/public/gui/session/input.js
| 253| »   var·actionInfo·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'actionInfo' to 'undefined'.

binaries/data/mods/public/gui/session/input.js
| 267| »   for·(var·action·of·actions)
|    | [NORMAL] JSHintBear:
|    | 'action' is already defined.

binaries/data/mods/public/gui/session/input.js
| 270| »   »   »   var·r·=·g_UnitActions[action].hotkeyActionCheck(target,·selection);
|    | [NORMAL] JSHintBear:
|    | 'r' is already defined.

binaries/data/mods/public/gui/session/input.js
| 275| »   for·(var·action·of·actions)
|    | [NORMAL] JSHintBear:
|    | 'action' is already defined.

binaries/data/mods/public/gui/session/input.js
| 278| »   »   »   var·r·=·g_UnitActions[action].actionCheck(target,·selection);
|    | [NORMAL] JSHintBear:
|    | 'r' is already defined.

binaries/data/mods/public/gui/session/input.js
| 486| »   »   &&·(ev.button·==·SDL_BUTTON_LEFT·||·ev.button·==·SDL_BUTTON_RIGHT))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/gui/session/input.js
| 516| »   »   »   »   var·rect·=·updateBandbox(bandbox,·ev,·true);
|    | [NORMAL] JSHintBear:
|    | 'rect' is already defined.

binaries/data/mods/public/gui/session/input.js
| 519| »   »   »   »   var·ents·=·getPreferredEntities(Engine.PickPlayerEntitiesInRect(rect[0],·rect[1],·rect[2],·rect[3],·g_ViewedPlayer));
|    | [NORMAL] JSHintBear:
|    | 'ents' is already defined.

binaries/data/mods/public/gui/session/input.js
| 676| »   »   »   »   »   var·queued·=·Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] JSHintBear:
|    | 'queued' is already defined.

binaries/data/mods/public/gui/session/input.js
| 719| »   »   »   let·maxDragDelta·=·16;
|    | [MAJOR] JSHintBear:
|    | 'maxDragDelta' has already been declared.

binaries/data/mods/public/gui/session/input.js
| 750| »   »   »   »   var·queued·=·Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] JSHintBear:
|    | 'queued' is already defined.

binaries/data/mods/public/gui/session/input.js
| 880| »   »   »   »   »   »   var·sptr·=·ev.hotkey.split(".");
|    | [NORMAL] JSHintBear:
|    | 'sptr' is already defined.

binaries/data/mods/public/gui/session/input.js
| 896| »   »   »   var·ent·=·Engine.PickEntityAtPoint(ev.x,·ev.y);
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/gui/session/input.js
| 922| »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'default'.

binaries/data/mods/public/gui/session/input.js
| 946| »   »   »   var·ent·=·Engine.PickEntityAtPoint(ev.x,·ev.y);
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|  66|  66| 		let phase = "";
|  67|  67| 		let cmpTechnologyManager = QueryPlayerIDInterface(i, IID_TechnologyManager);
|  68|  68| 		if (cmpTechnologyManager)
|  69|    |-		{
|    |  69|+		
|  70|  70| 			if (cmpTechnologyManager.IsTechnologyResearched("phase_city"))
|  71|  71| 				phase = "city";
|  72|  72| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_town"))
|  73|  73| 				phase = "town";
|  74|  74| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_village"))
|  75|  75| 				phase = "village";
|  76|    |-		}
|    |  76|+		
|  77|  77| 
|  78|  78| 		// store player ally/neutral/enemy data as arrays
|  79|  79| 		let allies = [];
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 410| 410| 			ret.attack[type].elevationBonus = range.elevationBonus;
| 411| 411| 
| 412| 412| 			if (cmpUnitAI && cmpPosition && cmpPosition.IsInWorld())
| 413|    |-			{
|    | 413|+			
| 414| 414| 				// For units, take the range in front of it, no spread. So angle = 0
| 415| 415| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 416|    |-			}
|    | 416|+			
| 417| 417| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 418| 418| 			{
| 419| 419| 				// For buildings, take the average elevation around it. So angle = 2*pi
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 415| 415| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 416| 416| 			}
| 417| 417| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 418|    |-			{
|    | 418|+			
| 419| 419| 				// For buildings, take the average elevation around it. So angle = 2*pi
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 421|    |-			}
|    | 421|+			
| 422| 422| 			else
| 423| 423| 			{
| 424| 424| 				// not in world, set a default?
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 421| 421| 			}
| 422| 422| 			else
| 423|    |-			{
|    | 423|+			
| 424| 424| 				// not in world, set a default?
| 425| 425| 				ret.attack[type].elevationAdaptedRange = ret.attack.maxRange;
| 426|    |-			}
|    | 426|+			
| 427| 427| 		}
| 428| 428| 	}
| 429| 429| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 791| 791| 		updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ?
| 792| 792| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] :
| 793| 793| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer],
| 794|    |-			cmpRangeManager.GetEntitiesByPlayer(i));
|    | 794|+		cmpRangeManager.GetEntitiesByPlayer(i));
| 795| 795| 	}
| 796| 796| 	updateEntityColor([IID_Selectable, IID_StatusBars], data.selected);
| 797| 797| 	Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors();
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1232|1232| 				start.snappedEnt = startSnapData.ent;
|1233|1233| 		}
|1234|1234| 	}
|1235|    |-	
|    |1235|+
|1236|1236| 	// See if we need to snap the start and/or end coordinates to any of our list of snap entities. Note that, despite the list
|1237|1237| 	// of snapping candidate entities, it might still snap to e.g. terrain features. Use the "ent" key in the returned snapping
|1238|1238| 	// data to determine whether it snapped to an entity (if any), and to which one (see GetFoundationSnapData).
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1280|1280| 			}
|1281|1281| 		}
|1282|1282| 	}
|1283|    |-	
|    |1283|+
|1284|1284| 
|1285|1285| 	// clear the single-building preview entity (we'll be rolling our own)
|1286|1286| 	this.SetBuildingPlacementPreview(player, { "template": "" });
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1349|1349| 		}
|1350|1350| 	}
|1351|1351| 	else
|1352|    |-	{
|    |1352|+	
|1353|1353| 		// Didn't snap to an existing entity, add the starting tower manually. To prevent odd-looking rotation jumps
|1354|1354| 		// when shift-clicking to build a wall, reuse the placement angle that was last seen on a validly positioned
|1355|1355| 		// wall piece.
|1370|1370| 			"pos": start.pos,
|1371|1371| 			"angle": previewEntities.length > 0 ? previewEntities[0].angle : this.placementWallLastAngle
|1372|1372| 		});
|1373|    |-	}
|    |1373|+	
|1374|1374| 
|1375|1375| 	if (end.pos)
|1376|1376| 	{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1373|1373| 	}
|1374|1374| 
|1375|1375| 	if (end.pos)
|1376|    |-	{
|    |1376|+	
|1377|1377| 		// Analogous to the starting side case above
|1378|1378| 		if (end.snappedEnt && end.snappedEnt != INVALID_ENTITY)
|1379|1379| 		{
|1411|1411| 				"pos": end.pos,
|1412|1412| 				"angle": previewEntities.length > 0 ? previewEntities[previewEntities.length-1].angle : this.placementWallLastAngle
|1413|1413| 			});
|1414|    |-	}
|    |1414|+	
|1415|1415| 
|1416|1416| 	let cmpTerrain = Engine.QueryInterface(SYSTEM_ENTITY, IID_Terrain);
|1417|1417| 	if (!cmpTerrain)
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1433|1433| 
|1434|1434| 	let allPiecesValid = true;
|1435|1435| 	let numRequiredPieces = 0; // number of entities that are required to build the entire wall, regardless of validity
|1436|    |-	
|    |1436|+
|1437|1437| 	let lengt = previewEntities.length;
|1438|1438| 	if (previewEntities.length && previewEntities[0].slot)
|1439|1439| 		lengt = 1;
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1437|1437| 	let lengt = previewEntities.length;
|1438|1438| 	if (previewEntities.length && previewEntities[0].slot)
|1439|1439| 		lengt = 1;
|1440|    |-	
|    |1440|+
|1441|1441| 	for (let i = 0; i < lengt; ++i)
|1442|1442| 	{
|1443|1443| 		let entInfo = previewEntities[i];
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1547|1547| 
|1548|1548| 			// TODO: Handle results of CheckPlacement
|1549|1549| 			validPlacement = cmpBuildRestrictions && cmpBuildRestrictions.CheckPlacement().success;
|1550|    |-	
|    |1550|+
|1551|1551| 			// If a wall piece has two control groups, it's likely a segment that spans
|1552|1552| 			// between two existing towers. To avoid placing a duplicate wall segment,
|1553|1553| 			// check for collisions with entities that share both control groups.
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1553|1553| 			// check for collisions with entities that share both control groups.
|1554|1554| 			if (validPlacement && entInfo.controlGroups && entInfo.controlGroups.length > 1)
|1555|1555| 				validPlacement = cmpObstruction.CheckDuplicateFoundation();
|1556|    |-			
|    |1556|+
|1557|1557| 			if (entInfo.slot)
|1558|1558| 				validPlacement = true;
|1559|1559| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1595|1595| 
|1596|1596| 		let cmpVisual = Engine.QueryInterface(ent, IID_Visual);
|1597|1597| 		if (cmpVisual)
|1598|    |-		{
|    |1598|+		
|1599|1599| 			if (!allPiecesValid || !canAfford)
|1600|1600| 				cmpVisual.SetShadingColor(1.4, 0.4, 0.4, 1);
|1601|1601| 			else
|1602|1602| 				cmpVisual.SetShadingColor(1, 1, 1, 1);
|1603|    |-		}
|    |1603|+		
|1604|1604| 
|1605|1605| 		++entPool.numUsed;
|1606|1606| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1670|1670| 			{
|1671|1671| 				minDist2 = dist2;
|1672|1672| 				minDistEntitySnapData = {
|1673|    |-						"x": pos.x,
|    |1673|+					"x": pos.x,
|1674|1674| 						"z": pos.z,
|1675|1675| 						"angle": cmpPosition.GetRotation().y,
|1676|1676| 						"ent": ent
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1671|1671| 				minDist2 = dist2;
|1672|1672| 				minDistEntitySnapData = {
|1673|1673| 						"x": pos.x,
|1674|    |-						"z": pos.z,
|    |1674|+					"z": pos.z,
|1675|1675| 						"angle": cmpPosition.GetRotation().y,
|1676|1676| 						"ent": ent
|1677|1677| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1672|1672| 				minDistEntitySnapData = {
|1673|1673| 						"x": pos.x,
|1674|1674| 						"z": pos.z,
|1675|    |-						"angle": cmpPosition.GetRotation().y,
|    |1675|+					"angle": cmpPosition.GetRotation().y,
|1676|1676| 						"ent": ent
|1677|1677| 				};
|1678|1678| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1673|1673| 						"x": pos.x,
|1674|1674| 						"z": pos.z,
|1675|1675| 						"angle": cmpPosition.GetRotation().y,
|1676|    |-						"ent": ent
|    |1676|+					"ent": ent
|1677|1677| 				};
|1678|1678| 			}
|1679|1679| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1818|1818| 			result.gain = cmpEntityTrader.GetGoods().amount;
|1819|1819| 	}
|1820|1820| 	else if (data.target === secondMarket)
|1821|    |-	{
|    |1821|+	
|1822|1822| 		result = {
|1823|1823| 			"type": "is second",
|1824|1824| 			"gain": cmpEntityTrader.GetGoods().amount,
|1825|1825| 		};
|1826|    |-	}
|    |1826|+	
|1827|1827| 	else if (!firstMarket)
|1828|1828| 	{
|1829|1829| 		result = { "type": "set first" };
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1825|1825| 		};
|1826|1826| 	}
|1827|1827| 	else if (!firstMarket)
|1828|    |-	{
|    |1828|+	
|1829|1829| 		result = { "type": "set first" };
|1830|    |-	}
|    |1830|+	
|1831|1831| 	else if (!secondMarket)
|1832|1832| 	{
|1833|1833| 		result = {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1829|1829| 		result = { "type": "set first" };
|1830|1830| 	}
|1831|1831| 	else if (!secondMarket)
|1832|    |-	{
|    |1832|+	
|1833|1833| 		result = {
|1834|1834| 			"type": "set second",
|1835|1835| 			"gain": cmpEntityTrader.CalculateGain(firstMarket, data.target),
|1836|1836| 		};
|1837|    |-	}
|    |1837|+	
|1838|1838| 	else
|1839|1839| 	{
|1840|1840| 		// Else both markets are not null and target is different from them
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1836|1836| 		};
|1837|1837| 	}
|1838|1838| 	else
|1839|    |-	{
|    |1839|+	
|1840|1840| 		// Else both markets are not null and target is different from them
|1841|1841| 		result = { "type": "set first" };
|1842|    |-	}
|    |1842|+	
|1843|1843| 	return result;
|1844|1844| };
|1845|1845| 
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1906|1906| 		if (!cmpIdentity || !cmpIdentity.HasClass("Slot"))
|1907|1907| 			continue;
|1908|1908| 		res.push(ent);
|1909|    |-		
|    |1909|+
|1910|1910| 	}
|1911|1911| 	return res;
|1912|1912| }
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1909|1909| 		
|1910|1910| 	}
|1911|1911| 	return res;
|1912|    |-}
|    |1912|+};
|1913|1913| 
|1914|1914| GuiInterface.prototype.SetSlotVisibility = function(player, data)
|1915|1915| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1926|1926| 			cmpRangeManager.RequestVisibilityUpdate(ent);
|1927|1927| 		}
|1928|1928| 	}
|1929|    |-}
|    |1929|+};
|1930|1930| 
|1931|1931| GuiInterface.prototype.GetTraderNumber = function(player)
|1932|1932| {
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|2040|2040| 	"GetTradingGoods": 1,
|2041|2041| 	"IsTemplateModified": 1,
|2042|2042| 	"ResetTemplateModified": 1,
|2043|    |-	
|    |2043|+
|2044|2044| 	"getSlots": 1,
|2045|2045| 	"SetSlotVisibility": 1,
|2046|2046| };

binaries/data/mods/public/simulation/components/GuiInterface.js
|1904| »   for·(let·ent·of·entities)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/GuiInterface.js
|1919| »   for·(let·ent·of·entities)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/GuiInterface.js
|1924| »   »   if·(cmpVisibility.IsHidden()·!=·!data.active)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/GuiInterface.js
|1912| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/GuiInterface.js
|1924| »   »   if·(cmpVisibility.IsHidden()·!=·!data.active)·{
|    | [NORMAL] JSHintBear:
|    | Confusing use of '!'.

binaries/data/mods/public/simulation/components/GuiInterface.js
|1929| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/Commands.js
| 900| »   var·ids·=·[·id·for·(id·in·members)·];
|    | [MAJOR] ESLintBear:
|    | Parsing error: Unexpected token for

binaries/data/mods/public/simulation/helpers/Commands.js
|  53| var·g_Commands·=·{
|    | [NORMAL] JSHintBear:
|    | 'g_Commands' was used before it was defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 541| »   »   »   »   ····&&·player·!=·+cmd.owner)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/helpers/Commands.js
| 729| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 900| »   var·ids·=·[·id·for·(id·in·members)·];
|    | [NORMAL] JSHintBear:
|    | 'array comprehension' is only available in Mozilla JavaScript extensions (use moz option).

binaries/data/mods/public/simulation/helpers/Commands.js
| 900| »   var·ids·=·[·id·for·(id·in·members)·];
|    | [NORMAL] JSHintBear:
|    | Expected 'for' and instead saw 'id'.

binaries/data/mods/public/simulation/helpers/Commands.js
| 950| »   »   for·(var·i·=·0;·i·<·length;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 963| »   »   var·count·=·0;
|    | [NORMAL] JSHintBear:
|    | 'count' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1110| »   »   var·cmpGuiInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGuiInterface' is already defined.

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1489| »   »   »   &&·cmpFormation.GetMemberCount()·==·formation.entities.length)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1548| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 0 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Visibility.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Visibility.js
|  17|  17| 	"<element name='Preview'>" +
|  18|  18| 		"<data type='boolean'/>" +
|  19|  19| 	"</element>"
|  20|    |-	;
|    |  20|+;
|  21|  21| 
|  22|  22| Visibility.prototype.Init = function()
|  23|  23| {
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Visibility.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Visibility.js
|  64|  64| {
|  65|  65| 	if (this.hidden)
|  66|  66| 		return VIS_HIDDEN;
|  67|    |-		
|    |  67|+
|  68|  68| 	if (this.preview)
|  69|  69| 	{
|  70|  70| 		// For the owner only, mock the "RetainInFog" behavior
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Visibility.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Visibility.js
|  85|  85| 		// For others, regular displaying
|  86|  86| 		return isVisible ? VIS_VISIBLE : VIS_HIDDEN;
|  87|  87| 	}
|  88|    |-	
|    |  88|+
|  89|  89| 	return VIS_VISIBLE;
|  90|  90| };
|  91|  91| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Visibility.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Visibility.js
|  92|  92| Visibility.prototype.SetHidden = function(hidden)
|  93|  93| {
|  94|  94| 	this.hidden = hidden;
|  95|    |-}
|    |  95|+};
|  96|  96| 
|  97|  97| Visibility.prototype.IsHidden = function()
|  98|  98| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Visibility.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Visibility.js
|  97|  97| Visibility.prototype.IsHidden = function()
|  98|  98| {
|  99|  99| 	return this.hidden;
| 100|    |-}
|    | 100|+};
| 101| 101| 
| 102| 102| Visibility.prototype.GetRetainInFog = function()
| 103| 103| {

binaries/data/mods/public/simulation/components/Visibility.js
|  95| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/Visibility.js
| 100| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Foundation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Foundation.js
|  39|  39| 	this.maxProgress = 0;
|  40|  40| 
|  41|  41| 	this.initialised = true;
|  42|    |-	
|    |  42|+
|  43|  43| 	let cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
|  44|  44| 	for (let ent of cmpObstruction.GetEntitiesDeletedUponConstruction())
|  45|  45| 		Engine.DestroyEntity(ent);

binaries/data/mods/public/simulation/components/Foundation.js
| 326| »   »   var·pos·=·cmpPosition.GetPosition2D();
|    | [NORMAL] JSHintBear:
|    | 'pos' is already defined.

binaries/data/mods/public/simulation/components/Foundation.js
| 328| »   »   var·rot·=·cmpPosition.GetRotation();
|    | [NORMAL] JSHintBear:
|    | 'rot' is already defined.
Executing section cli...

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

The new behavior is that lostwall turrets are stored in a local entity and can be restored by the wallplacement algorithm?

The problem with that was that there might be too many restore points, or restore points that the user doesn't want to see anymore.

Can we reduce the problem to restoring only these wall turrets where the adjacent walls still exist?
I.e. if the adjacent walls are gone, then the local entities could be removed as well.

And the user should have the choice to remove restore-points if the player wants a differently located wall.
Then the usability issues might be addressed.

The restore-points should look differently then (perhaps transparency), and capturing would have to be accounted for.
(Perhaps you did that already, I didn't investigate)

they are global, not local (territory capturing, range manager to get list of them)
if slot is in players territory, he can use it
they cannot be destroyed by selecting, because they are visible only when placing walls (and actually are green now)
but they are removed by any new foundation placed on them.

I see removing them if no attached wall there as this:
every tower would need to keep list of walls attached and every wall list of towers. tower=tower or slot.

so when one deatroy tower, slot spawnes only if it has list of walls unempty and if wall is destroyed it checks entities from list and if entity is slot it is removed

sounds good?

In D1190#76305, @Angen wrote:

if slot is in players territory, he can use it

I guess that's a use case for the player if he captured enemy walls.

If you mean this:

  • if a wall turret is destroyed, it creates a slot if there was an adjacent wall segment.
  • if a wall is destroyed, it removes adjacent slots if there is no wall piece adjacent to that slot.

Then yes, that would serve the use case of restoring turrets that don't fit in between two wall pieces and avoid displaying slots that are not useful to the player.
Question becomes how this can be stored efficiently.
Sounds like it should be stored in the entities themselves (wall component?), so that one doesn't have to check all entities globally but only the destroyed one.

Slot doesn't sound quite right.

Mostly wondering now whether this can't be achieved more simply, probably not.

binaries/data/mods/public/gui/session/input.js
1321

{space space} for JS objects

binaries/data/mods/public/simulation/components/GuiInterface.js
1234

Avoid copies using helper functions.

binaries/data/mods/public/simulation/components/Visibility.js
20

-\n

binaries/data/mods/public/simulation/helpers/Commands.js
1335

no braces for oneliners

Stan added a reviewer: Restricted Owners Package.May 2 2019, 2:08 PM
Stan added a subscriber: Stan.

Some comments.

binaries/data/mods/public/simulation/components/GuiInterface.js
1284

Nuke

1437

missing an 'h'

2044

'GetSlots'

binaries/data/mods/public/simulation/components/Health.js
324

Shouldn't it be defined in the template as the spawn entity on death ?

binaries/data/mods/public/simulation/components/WallSet.js
8

Copy paste.

binaries/data/mods/public/simulation/helpers/Commands.js
1261

Nuke.

Angen added inline comments.May 2 2019, 2:20 PM
binaries/data/mods/public/simulation/components/Health.js
324

I do not understand. It is defined in template.

gameboy added a subscriber: gameboy.May 2 2019, 2:51 PM
@Angen  You can ask him @wraitii  to solve the problem.
Stan added inline comments.May 2 2019, 2:52 PM
binaries/data/mods/public/simulation/components/Health.js
324

I mean there is already something that spawn entities on death ;) Any way to reuse that ?

Angen added a comment.May 2 2019, 2:57 PM
@Angen  You can ask him @wraitii  to solve the problem.

why?

@Angen I think this problem is very difficult for you. Has this patch been perfected?

Angen added a comment.May 2 2019, 3:35 PM

it is still wip

Angen planned changes to this revision.May 3 2019, 10:30 AM

cleaning and make active slots only attached to existed wall segment

Stan added inline comments.May 3 2019, 1:11 PM
binaries/data/mods/public/gui/session/input.js
1107

{"player": g_ViewedPlayer, "active": false} → { "player": g_ViewedPlayer, "active": false }

1321

{"player": g_ViewedPlayer, "active": true}) → { "player": g_ViewedPlayer, "active": true })

Maybe it could be a function ?

@Angen What other issues need to be addressed with respect to this patch?