Page MenuHomeWildfire Games

Position units on a free drawn line
ClosedPublic

Authored by OptimusShepard on Nov 7 2017, 10:14 PM.

Details

Summary

Allowes to position units on a free drawn line

Test Plan
  1. You select some of your units
  2. Now you can press and hold M2 on your mouse and draw a line (If you only click, the units shall react as usual)
  3. When you release M2, your selected units should spread out on this line

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 4835
Build 8384: Vulcan BuildJenkins

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
OptimusShepard added inline comments.Feb 10 2018, 1:22 PM
binaries/data/mods/public/gui/session/input.js
1228–1230

I think with your code they will walk a little bit longer. But how they are walkin looks better for die eyes ;)

1231

thx

1267

Thx. I didn't see that problem. Now it should be save

OptimusShepard marked 4 inline comments as done.Feb 10 2018, 1:23 PM
OptimusShepard added inline comments.Feb 10 2018, 1:31 PM
binaries/data/mods/public/gui/session/input.js
1215

Mostly there is one missing point. In my tests I've never had too much points. But if it that will happen I agree with bb that this could course an error

elexis added inline comments.Feb 10 2018, 1:34 PM
binaries/data/mods/public/gui/session/input.js
1238

Also I think the player would appreciate being able to use the modifiers, like attack-walk

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

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (309 tests).....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (309 tests).....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...

Link to build: https://jenkins.wildfiregames.com/job/phabricator/2719/display/redirect

creat command function

Imarok added inline comments.Feb 11 2018, 12:21 AM
binaries/data/mods/public/gui/session/input.js
1238

This will spam the replay files. Not sure if there is a performance overhead attached too.
It seems cleaner to extend Commands.js by a new command type and then do the unit commanding in there, would you agree @bb, @Imarok?
The computation of destination positions should likely remain in here, so that we pass as few information as possible over (also I guess screen coordinates only make sense in this file).

seems ok

1238

Also I think the player would appreciate being able to use the modifiers, like attack-walk

What would be the usecase?

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

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (309 tests).....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (309 tests).....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...

Link to build: https://jenkins.wildfiregames.com/job/phabricator/2723/display/redirect

implement attack-walk-line

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

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

OptimusShepard marked 4 inline comments as done.Feb 11 2018, 3:05 PM
OptimusShepard added inline comments.
binaries/data/mods/public/gui/session/input.js
1022

Is there any difference on performance? If I take square, there is one operation less on "g_DragStart.distanceTo(ev)" but one more operation on g_MaxDragDelta?

1238

I also don't see the usecase, but it doesn't hurt

elexis added inline comments.Feb 11 2018, 3:27 PM
binaries/data/mods/public/gui/session/input.js
50

If we have comments, they should use JSdoc.
Globals should have one brief information (i.e. that isn't self evident) explaining what they are used for.

1180

return if !right

1194

no else after return

1244

Could use type: hotkey ? "walk-line" : "attack-walk-line"

Shouldn't this support queueing too as usual?

binaries/data/mods/public/simulation/helpers/Commands.js
159 ↗(On Diff #5765)

i -> ent or entityID

185 ↗(On Diff #5765)

Not really a line, maybe walk-custom and attack-walk-custom? Perhaps bb or Imarok have a better name.

188 ↗(On Diff #5765)

Since the other commands all use entities for target, using targetPositions or something like that would be preferable.

edit the commends

OptimusShepard marked 11 inline comments as done.Feb 11 2018, 4:40 PM

return queued to false

OptimusShepard added inline comments.Feb 11 2018, 4:52 PM
binaries/data/mods/public/gui/session/input.js
1244

if queued is true, you can't react quickly

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

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

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

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

bb added inline comments.Feb 13 2018, 10:41 PM
binaries/data/mods/public/gui/session/input.js
45

a sentence should end with a period

53–54

periods

1022

but a sqrt is much more a performance drain that a square, also even if it isn't performance critical every little thing helps, and code executes the same

1176

also taking the square helps for performance (one could also store the resolutionSquared for even better performance)

1221

many points

1223

If one wants to take into account multiple points missing, one could
entityDistribution = entityDistribution.concat(new Array(selection.length - entityDistribution.length).fill(inputLine[inputLine.length - 1])

(check theoretically unneeded that way)

1224

else if
(Theoretically check isn't needed)

1225

(could be slice aswel, no strong opinion)

1229–1232

inline

1241

Engine.HotkeyIsPressed("session.queue")

replace distanceTo with square for better performance

OptimusShepard marked 15 inline comments as done.Feb 18 2018, 8:26 PM
OptimusShepard added inline comments.Feb 18 2018, 8:31 PM
binaries/data/mods/public/gui/session/input.js
1176

it isn't the same like bevore. But I think this is ok. It also have better performance I think

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

Linter detected issues:
Executing section Default...
Executing section Source...
Executing section JS...

binaries/data/mods/public/simulation/helpers/Commands.js
| 918| »   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
| 545| »   »   »   »   ····&&·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
| 733| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 918| »   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
| 918| »   var·ids·=·[·id·for·(id·in·members)·];
|    | [NORMAL] JSHintBear:
|    | Expected 'for' and instead saw 'id'.

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1380| »   »   var·piece·=·pieces[j];
|    | [NORMAL] JSHintBear:
|    | 'piece' is already defined.

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1501| »   »   »   &&·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
|1527| »   »   »   »   »   var·cmpUnitAI·=·Engine.QueryInterface(ent,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitAI' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1552| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [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
| 174| 174| 		}
| 175| 175| 	}
| 176| 176| 	else if (placementSupport.mode === "wall")
| 177|    |-	{
|    | 177|+	
| 178| 178| 		if (placementSupport.wallSet && placementSupport.position)
| 179| 179| 		{
| 180| 180| 			// Fetch an updated list of snapping candidate entities
| 192| 192| 				"snapEntities": placementSupport.wallSnapEntities,	// snapping entities (towers) for starting a wall segment
| 193| 193| 			});
| 194| 194| 		}
| 195|    |-	}
|    | 195|+	
| 196| 196| 
| 197| 197| 	return false;
| 198| 198| }
|    | [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
| 281| 281| 	}
| 282| 282| 
| 283| 283| 	if (!updateBuildingPlacementPreview())
| 284|    |-	{
|    | 284|+	
| 285| 285| 		// invalid location - don't build it
| 286| 286| 		// TODO: play a sound?
| 287| 287| 		return false;
| 288|    |-	}
|    | 288|+	
| 289| 289| 
| 290| 290| 	var selection = g_Selection.toList();
| 291| 291| 
|    | [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
| 320| 320| 	}
| 321| 321| 
| 322| 322| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 323|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 323|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 324| 324| 	{
| 325| 325| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 326| 326| 		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
| 347| 347| 	// (this is somewhat non-ideal and hardcode-ish)
| 348| 348| 	var hasWallSegment = false;
| 349| 349| 	for (let piece of cmd.pieces)
| 350|    |-	{
|    | 350|+	
| 351| 351| 		if (piece.template != cmd.wallSet.templates.tower) // TODO: hardcode-ish :(
| 352| 352| 		{
| 353| 353| 			hasWallSegment = true;
| 354| 354| 			break;
| 355| 355| 		}
| 356|    |-	}
|    | 356|+	
| 357| 357| 
| 358| 358| 	if (hasWallSegment)
| 359| 359| 	{
|    | [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
| 470| 470| 	mouseIsOverObject = (hoveredObject != null);
| 471| 471| 
| 472| 472| 	// Close the menu when interacting with the game world
| 473|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 474|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 473|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 474|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 475| 475| 		closeMenu();
| 476| 476| 
| 477| 477| 	// 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
| 511| 511| 
| 512| 512| 				// Update the list of selected units
| 513| 513| 				if (Engine.HotkeyIsPressed("selection.add"))
| 514|    |-				{
|    | 514|+				
| 515| 515| 					g_Selection.addList(ents);
| 516|    |-				}
|    | 516|+				
| 517| 517| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 518| 518| 				{
| 519| 519| 					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
| 515| 515| 					g_Selection.addList(ents);
| 516| 516| 				}
| 517| 517| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 518|    |-				{
|    | 518|+				
| 519| 519| 					g_Selection.removeList(ents);
| 520|    |-				}
|    | 520|+				
| 521| 521| 				else
| 522| 522| 				{
| 523| 523| 					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
| 571| 571| 				// If shift is down, let the player continue placing another of the same building
| 572| 572| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 573| 573| 				if (tryPlaceBuilding(queued))
| 574|    |-				{
|    | 574|+				
| 575| 575| 					if (queued)
| 576| 576| 						inputState = INPUT_BUILDING_PLACEMENT;
| 577| 577| 					else
| 578| 578| 						inputState = INPUT_NORMAL;
| 579|    |-				}
|    | 579|+				
| 580| 580| 				else
| 581| 581| 				{
| 582| 582| 					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
| 578| 578| 						inputState = INPUT_NORMAL;
| 579| 579| 				}
| 580| 580| 				else
| 581|    |-				{
|    | 581|+				
| 582| 582| 					inputState = INPUT_BUILDING_PLACEMENT;
| 583|    |-				}
|    | 583|+				
| 584| 584| 				return true;
| 585| 585| 			}
| 586| 586| 			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
| 631| 631| 		// user to continue building walls.
| 632| 632| 		switch (ev.type)
| 633| 633| 		{
| 634|    |-			case "mousemotion":
|    | 634|+		case "mousemotion":
| 635| 635| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 636| 636| 
| 637| 637| 				// 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
| 632| 632| 		switch (ev.type)
| 633| 633| 		{
| 634| 634| 			case "mousemotion":
| 635|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 635|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 636| 636| 
| 637| 637| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 638| 638| 				// 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
| 634| 634| 			case "mousemotion":
| 635| 635| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 636| 636| 
| 637|    |-				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 637|+			// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 638| 638| 				// the ending point and the starting point to snap to.
| 639| 639| 				//
| 640| 640| 				// 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
| 635| 635| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 636| 636| 
| 637| 637| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 638|    |-				// the ending point and the starting point to snap to.
|    | 638|+			// the ending point and the starting point to snap to.
| 639| 639| 				//
| 640| 640| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 641| 641| 				// 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
| 636| 636| 
| 637| 637| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 638| 638| 				// the ending point and the starting point to snap to.
| 639|    |-				//
|    | 639|+			//
| 640| 640| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 641| 641| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 642| 642| 				// 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
| 637| 637| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 638| 638| 				// the ending point and the starting point to snap to.
| 639| 639| 				//
| 640|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 640|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 641| 641| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 642| 642| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 643| 643| 				// 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
| 638| 638| 				// the ending point and the starting point to snap to.
| 639| 639| 				//
| 640| 640| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 641|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 641|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 642| 642| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 643| 643| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 644| 644| 				// 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
| 639| 639| 				//
| 640| 640| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 641| 641| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 642|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 642|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 643| 643| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 644| 644| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 645| 645| 				// 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
| 640| 640| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 641| 641| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 642| 642| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 643|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 643|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 644| 644| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 645| 645| 				// points.
| 646| 646| 
|    | [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
| 641| 641| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 642| 642| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 643| 643| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 644|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 644|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 645| 645| 				// points.
| 646| 646| 
| 647| 647| 				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
| 642| 642| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 643| 643| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 644| 644| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 645|    |-				// points.
|    | 645|+			// points.
| 646| 646| 
| 647| 647| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 648| 648| 				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
| 644| 644| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 645| 645| 				// points.
| 646| 646| 
| 647|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 647|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 648| 648| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 649| 649| 
| 650| 650| 				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
| 645| 645| 				// points.
| 646| 646| 
| 647| 647| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 648|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 648|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 649| 649| 
| 650| 650| 				if (result && result.cost)
| 651| 651| 				{
|    | [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.wallSnapEntitiesIncludeOffscreen = true;
| 648| 648| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 649| 649| 
| 650|    |-				if (result && result.cost)
|    | 650|+			if (result && result.cost)
| 651| 651| 				{
| 652| 652| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 653| 653| 					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
| 648| 648| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 649| 649| 
| 650| 650| 				if (result && result.cost)
| 651|    |-				{
|    | 651|+			{
| 652| 652| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 653| 653| 					placementSupport.tooltipMessage = [
| 654| 654| 						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
| 649| 649| 
| 650| 650| 				if (result && result.cost)
| 651| 651| 				{
| 652|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 652|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 653| 653| 					placementSupport.tooltipMessage = [
| 654| 654| 						getEntityCostTooltip(result),
| 655| 655| 						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
| 650| 650| 				if (result && result.cost)
| 651| 651| 				{
| 652| 652| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 653|    |-					placementSupport.tooltipMessage = [
|    | 653|+				placementSupport.tooltipMessage = [
| 654| 654| 						getEntityCostTooltip(result),
| 655| 655| 						getNeededResourcesTooltip(neededResources)
| 656| 656| 					].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
| 651| 651| 				{
| 652| 652| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 653| 653| 					placementSupport.tooltipMessage = [
| 654|    |-						getEntityCostTooltip(result),
|    | 654|+					getEntityCostTooltip(result),
| 655| 655| 						getNeededResourcesTooltip(neededResources)
| 656| 656| 					].filter(tip => tip).join("\n");
| 657| 657| 				}
|    | [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
| 652| 652| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 653| 653| 					placementSupport.tooltipMessage = [
| 654| 654| 						getEntityCostTooltip(result),
| 655|    |-						getNeededResourcesTooltip(neededResources)
|    | 655|+					getNeededResourcesTooltip(neededResources)
| 656| 656| 					].filter(tip => tip).join("\n");
| 657| 657| 				}
| 658| 658| 
|    | [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
| 653| 653| 					placementSupport.tooltipMessage = [
| 654| 654| 						getEntityCostTooltip(result),
| 655| 655| 						getNeededResourcesTooltip(neededResources)
| 656|    |-					].filter(tip => tip).join("\n");
|    | 656|+				].filter(tip => tip).join("\n");
| 657| 657| 				}
| 658| 658| 
| 659| 659| 				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
| 654| 654| 						getEntityCostTooltip(result),
| 655| 655| 						getNeededResourcesTooltip(neededResources)
| 656| 656| 					].filter(tip => tip).join("\n");
| 657|    |-				}
|    | 657|+			}
| 658| 658| 
| 659| 659| 				break;
| 660| 660| 
|    | [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| 					].filter(tip => tip).join("\n");
| 657| 657| 				}
| 658| 658| 
| 659|    |-				break;
|    | 659|+			break;
| 660| 660| 
| 661| 661| 			case "mousebuttondown":
| 662| 662| 				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
| 658| 658| 
| 659| 659| 				break;
| 660| 660| 
| 661|    |-			case "mousebuttondown":
|    | 661|+		case "mousebuttondown":
| 662| 662| 				if (ev.button == SDL_BUTTON_LEFT)
| 663| 663| 				{
| 664| 664| 					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
| 659| 659| 				break;
| 660| 660| 
| 661| 661| 			case "mousebuttondown":
| 662|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 662|+			if (ev.button == SDL_BUTTON_LEFT)
| 663| 663| 				{
| 664| 664| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 665| 665| 					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
| 660| 660| 
| 661| 661| 			case "mousebuttondown":
| 662| 662| 				if (ev.button == SDL_BUTTON_LEFT)
| 663|    |-				{
|    | 663|+			{
| 664| 664| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 665| 665| 					if (tryPlaceWall(queued))
| 666| 666| 					{
|    | [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| 			case "mousebuttondown":
| 662| 662| 				if (ev.button == SDL_BUTTON_LEFT)
| 663| 663| 				{
| 664|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 664|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 665| 665| 					if (tryPlaceWall(queued))
| 666| 666| 					{
| 667| 667| 						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
| 662| 662| 				if (ev.button == SDL_BUTTON_LEFT)
| 663| 663| 				{
| 664| 664| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 665|    |-					if (tryPlaceWall(queued))
|    | 665|+				if (tryPlaceWall(queued))
| 666| 666| 					{
| 667| 667| 						if (queued)
| 668| 668| 						{
|    | [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
| 663| 663| 				{
| 664| 664| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 665| 665| 					if (tryPlaceWall(queued))
| 666|    |-					{
|    | 666|+					
| 667| 667| 						if (queued)
| 668| 668| 						{
| 669| 669| 							// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.Reset();
| 678| 678| 							inputState = INPUT_NORMAL;
| 679| 679| 						}
| 680|    |-					}
|    | 680|+					
| 681| 681| 					else
| 682| 682| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 683| 683| 
|    | [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
| 663| 663| 				{
| 664| 664| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 665| 665| 					if (tryPlaceWall(queued))
| 666|    |-					{
|    | 666|+				{
| 667| 667| 						if (queued)
| 668| 668| 						{
| 669| 669| 							// 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
| 664| 664| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 665| 665| 					if (tryPlaceWall(queued))
| 666| 666| 					{
| 667|    |-						if (queued)
|    | 667|+					if (queued)
| 668| 668| 						{
| 669| 669| 							// continue building, just set a new starting position where we left off
| 670| 670| 							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
| 665| 665| 					if (tryPlaceWall(queued))
| 666| 666| 					{
| 667| 667| 						if (queued)
| 668|    |-						{
|    | 668|+					{
| 669| 669| 							// continue building, just set a new starting position where we left off
| 670| 670| 							placementSupport.position = placementSupport.wallEndPosition;
| 671| 671| 							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
| 666| 666| 					{
| 667| 667| 						if (queued)
| 668| 668| 						{
| 669|    |-							// continue building, just set a new starting position where we left off
|    | 669|+						// continue building, just set a new starting position where we left off
| 670| 670| 							placementSupport.position = placementSupport.wallEndPosition;
| 671| 671| 							placementSupport.wallEndPosition = undefined;
| 672| 672| 
|    | [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
| 667| 667| 						if (queued)
| 668| 668| 						{
| 669| 669| 							// continue building, just set a new starting position where we left off
| 670|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 670|+						placementSupport.position = placementSupport.wallEndPosition;
| 671| 671| 							placementSupport.wallEndPosition = undefined;
| 672| 672| 
| 673| 673| 							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
| 668| 668| 						{
| 669| 669| 							// continue building, just set a new starting position where we left off
| 670| 670| 							placementSupport.position = placementSupport.wallEndPosition;
| 671|    |-							placementSupport.wallEndPosition = undefined;
|    | 671|+						placementSupport.wallEndPosition = undefined;
| 672| 672| 
| 673| 673| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 674| 674| 						}
|    | [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
| 670| 670| 							placementSupport.position = placementSupport.wallEndPosition;
| 671| 671| 							placementSupport.wallEndPosition = undefined;
| 672| 672| 
| 673|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 673|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 674| 674| 						}
| 675| 675| 						else
| 676| 676| 						{
|    | [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
| 671| 671| 							placementSupport.wallEndPosition = undefined;
| 672| 672| 
| 673| 673| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 674|    |-						}
|    | 674|+					}
| 675| 675| 						else
| 676| 676| 						{
| 677| 677| 							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
| 672| 672| 
| 673| 673| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 674| 674| 						}
| 675|    |-						else
|    | 675|+					else
| 676| 676| 						{
| 677| 677| 							placementSupport.Reset();
| 678| 678| 							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
| 673| 673| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 674| 674| 						}
| 675| 675| 						else
| 676|    |-						{
|    | 676|+					{
| 677| 677| 							placementSupport.Reset();
| 678| 678| 							inputState = INPUT_NORMAL;
| 679| 679| 						}
|    | [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
| 674| 674| 						}
| 675| 675| 						else
| 676| 676| 						{
| 677|    |-							placementSupport.Reset();
|    | 677|+						placementSupport.Reset();
| 678| 678| 							inputState = INPUT_NORMAL;
| 679| 679| 						}
| 680| 680| 					}
|    | [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
| 675| 675| 						else
| 676| 676| 						{
| 677| 677| 							placementSupport.Reset();
| 678|    |-							inputState = INPUT_NORMAL;
|    | 678|+						inputState = INPUT_NORMAL;
| 679| 679| 						}
| 680| 680| 					}
| 681| 681| 					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
| 676| 676| 						{
| 677| 677| 							placementSupport.Reset();
| 678| 678| 							inputState = INPUT_NORMAL;
| 679|    |-						}
|    | 679|+					}
| 680| 680| 					}
| 681| 681| 					else
| 682| 682| 						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
| 677| 677| 							placementSupport.Reset();
| 678| 678| 							inputState = INPUT_NORMAL;
| 679| 679| 						}
| 680|    |-					}
|    | 680|+				}
| 681| 681| 					else
| 682| 682| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 683| 683| 
|    | [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
| 678| 678| 							inputState = INPUT_NORMAL;
| 679| 679| 						}
| 680| 680| 					}
| 681|    |-					else
|    | 681|+				else
| 682| 682| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 683| 683| 
| 684| 684| 					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
| 679| 679| 						}
| 680| 680| 					}
| 681| 681| 					else
| 682|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 682|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 683| 683| 
| 684| 684| 					updateBuildingPlacementPreview();
| 685| 685| 					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
| 681| 681| 					else
| 682| 682| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 683| 683| 
| 684|    |-					updateBuildingPlacementPreview();
|    | 684|+				updateBuildingPlacementPreview();
| 685| 685| 					return true;
| 686| 686| 				}
| 687| 687| 				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
| 682| 682| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 683| 683| 
| 684| 684| 					updateBuildingPlacementPreview();
| 685|    |-					return true;
|    | 685|+				return true;
| 686| 686| 				}
| 687| 687| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 688| 688| 				{
|    | [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
| 683| 683| 
| 684| 684| 					updateBuildingPlacementPreview();
| 685| 685| 					return true;
| 686|    |-				}
|    | 686|+			}
| 687| 687| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 688| 688| 				{
| 689| 689| 					// reset to normal input mode
|    | [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
| 684| 684| 					updateBuildingPlacementPreview();
| 685| 685| 					return true;
| 686| 686| 				}
| 687|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 687|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 688| 688| 				{
| 689| 689| 					// reset to normal input mode
| 690| 690| 					placementSupport.Reset();
|    | [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
| 685| 685| 					return true;
| 686| 686| 				}
| 687| 687| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 688|    |-				{
|    | 688|+			{
| 689| 689| 					// reset to normal input mode
| 690| 690| 					placementSupport.Reset();
| 691| 691| 					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
| 686| 686| 				}
| 687| 687| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 688| 688| 				{
| 689|    |-					// reset to normal input mode
|    | 689|+				// reset to normal input mode
| 690| 690| 					placementSupport.Reset();
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 
|    | [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
| 687| 687| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 688| 688| 				{
| 689| 689| 					// reset to normal input mode
| 690|    |-					placementSupport.Reset();
|    | 690|+				placementSupport.Reset();
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 
| 693| 693| 					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
| 688| 688| 				{
| 689| 689| 					// reset to normal input mode
| 690| 690| 					placementSupport.Reset();
| 691|    |-					updateBuildingPlacementPreview();
|    | 691|+				updateBuildingPlacementPreview();
| 692| 692| 
| 693| 693| 					inputState = INPUT_NORMAL;
| 694| 694| 					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
| 690| 690| 					placementSupport.Reset();
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 
| 693|    |-					inputState = INPUT_NORMAL;
|    | 693|+				inputState = INPUT_NORMAL;
| 694| 694| 					return true;
| 695| 695| 				}
| 696| 696| 				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
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 
| 693| 693| 					inputState = INPUT_NORMAL;
| 694|    |-					return true;
|    | 694|+				return true;
| 695| 695| 				}
| 696| 696| 				break;
| 697| 697| 		}
|    | [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
| 692| 692| 
| 693| 693| 					inputState = INPUT_NORMAL;
| 694| 694| 					return true;
| 695|    |-				}
|    | 695|+			}
| 696| 696| 				break;
| 697| 697| 		}
| 698| 698| 		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
| 693| 693| 					inputState = INPUT_NORMAL;
| 694| 694| 					return true;
| 695| 695| 				}
| 696|    |-				break;
|    | 696|+			break;
| 697| 697| 		}
| 698| 698| 		break;
| 699| 699| 
|    | [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
| 703| 703| 		case "mousemotion":
| 704| 704| 			let maxDragDelta = 16;
| 705| 705| 			if (g_DragStart.distanceTo(ev) >= maxDragDelta)
| 706|    |-			{
|    | 706|+			
| 707| 707| 				// Rotate in the direction of the mouse
| 708| 708| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 709|    |-			}
|    | 709|+			
| 710| 710| 			else
| 711| 711| 			{
| 712| 712| 				// 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
| 708| 708| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 709| 709| 			}
| 710| 710| 			else
| 711|    |-			{
|    | 711|+			
| 712| 712| 				// If the mouse is near the center, snap back to the default orientation
| 713| 713| 				placementSupport.SetDefaultAngle();
| 714|    |-			}
|    | 714|+			
| 715| 715| 
| 716| 716| 			var snapData = Engine.GuiInterfaceCall("GetFoundationSnapData", {
| 717| 717| 				"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
| 734| 734| 				// If shift is down, let the player continue placing another of the same building
| 735| 735| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 736| 736| 				if (tryPlaceBuilding(queued))
| 737|    |-				{
|    | 737|+				
| 738| 738| 					if (queued)
| 739| 739| 						inputState = INPUT_BUILDING_PLACEMENT;
| 740| 740| 					else
| 741| 741| 						inputState = INPUT_NORMAL;
| 742|    |-				}
|    | 742|+				
| 743| 743| 				else
| 744| 744| 				{
| 745| 745| 					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
| 741| 741| 						inputState = INPUT_NORMAL;
| 742| 742| 				}
| 743| 743| 				else
| 744|    |-				{
|    | 744|+				
| 745| 745| 					inputState = INPUT_BUILDING_PLACEMENT;
| 746|    |-				}
|    | 746|+				
| 747| 747| 				return true;
| 748| 748| 			}
| 749| 749| 			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
| 790| 790| 
| 791| 791| 	// Handle the time-warp testing features, restricted to single-player
| 792| 792| 	if (!g_IsNetworked && Engine.GetGUIObjectByName("devTimeWarp").checked)
| 793|    |-	{
|    | 793|+	
| 794| 794| 		if (ev.type == "hotkeydown" && ev.hotkey == "session.timewarp.fastforward")
| 795| 795| 			Engine.SetSimRate(20.0);
| 796| 796| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.fastforward")
| 797| 797| 			Engine.SetSimRate(1.0);
| 798| 798| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.rewind")
| 799| 799| 			Engine.RewindTimeWarp();
| 800|    |-	}
|    | 800|+	
| 801| 801| 
| 802| 802| 	if (ev.hotkey == "session.highlightguarding")
| 803| 803| 	{
|    | [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
| 849| 849| 			break;
| 850| 850| 
| 851| 851| 		case "hotkeydown":
| 852|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 852|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 853| 853| 				{
| 854| 854| 					let now = Date.now();
| 855| 855| 					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
| 850| 850| 
| 851| 851| 		case "hotkeydown":
| 852| 852| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 853|    |-				{
|    | 853|+			{
| 854| 854| 					let now = Date.now();
| 855| 855| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 856| 856| 					{
|    | [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
| 851| 851| 		case "hotkeydown":
| 852| 852| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 853| 853| 				{
| 854|    |-					let now = Date.now();
|    | 854|+				let now = Date.now();
| 855| 855| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 856| 856| 					{
| 857| 857| 						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
| 852| 852| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 853| 853| 				{
| 854| 854| 					let now = Date.now();
| 855|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 855|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 856| 856| 					{
| 857| 857| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 858| 858| 						{
|    | [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
| 853| 853| 				{
| 854| 854| 					let now = Date.now();
| 855| 855| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 856|    |-					{
|    | 856|+				{
| 857| 857| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 858| 858| 						{
| 859| 859| 							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
| 854| 854| 					let now = Date.now();
| 855| 855| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 856| 856| 					{
| 857|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 857|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 858| 858| 						{
| 859| 859| 							var sptr = ev.hotkey.split(".");
| 860| 860| 							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
| 855| 855| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 856| 856| 					{
| 857| 857| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 858|    |-						{
|    | 858|+					{
| 859| 859| 							var sptr = ev.hotkey.split(".");
| 860| 860| 							performGroup("snap", sptr[3]);
| 861| 861| 						}
|    | [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
| 856| 856| 					{
| 857| 857| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 858| 858| 						{
| 859|    |-							var sptr = ev.hotkey.split(".");
|    | 859|+						var sptr = ev.hotkey.split(".");
| 860| 860| 							performGroup("snap", sptr[3]);
| 861| 861| 						}
| 862| 862| 					}
|    | [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
| 857| 857| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 858| 858| 						{
| 859| 859| 							var sptr = ev.hotkey.split(".");
| 860|    |-							performGroup("snap", sptr[3]);
|    | 860|+						performGroup("snap", sptr[3]);
| 861| 861| 						}
| 862| 862| 					}
| 863| 863| 					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
| 858| 858| 						{
| 859| 859| 							var sptr = ev.hotkey.split(".");
| 860| 860| 							performGroup("snap", sptr[3]);
| 861|    |-						}
|    | 861|+					}
| 862| 862| 					}
| 863| 863| 					else
| 864| 864| 					{
|    | [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
| 859| 859| 							var sptr = ev.hotkey.split(".");
| 860| 860| 							performGroup("snap", sptr[3]);
| 861| 861| 						}
| 862|    |-					}
|    | 862|+				}
| 863| 863| 					else
| 864| 864| 					{
| 865| 865| 						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
| 860| 860| 							performGroup("snap", sptr[3]);
| 861| 861| 						}
| 862| 862| 					}
| 863|    |-					else
|    | 863|+				else
| 864| 864| 					{
| 865| 865| 						var sptr = ev.hotkey.split(".");
| 866| 866| 						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
| 861| 861| 						}
| 862| 862| 					}
| 863| 863| 					else
| 864|    |-					{
|    | 864|+				{
| 865| 865| 						var sptr = ev.hotkey.split(".");
| 866| 866| 						performGroup(sptr[2], sptr[3]);
| 867| 867| 
|    | [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
| 862| 862| 					}
| 863| 863| 					else
| 864| 864| 					{
| 865|    |-						var sptr = ev.hotkey.split(".");
|    | 865|+					var sptr = ev.hotkey.split(".");
| 866| 866| 						performGroup(sptr[2], sptr[3]);
| 867| 867| 
| 868| 868| 						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
| 863| 863| 					else
| 864| 864| 					{
| 865| 865| 						var sptr = ev.hotkey.split(".");
| 866|    |-						performGroup(sptr[2], sptr[3]);
|    | 866|+					performGroup(sptr[2], sptr[3]);
| 867| 867| 
| 868| 868| 						doublePressTimer = now;
| 869| 869| 						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
| 865| 865| 						var sptr = ev.hotkey.split(".");
| 866| 866| 						performGroup(sptr[2], sptr[3]);
| 867| 867| 
| 868|    |-						doublePressTimer = now;
|    | 868|+					doublePressTimer = now;
| 869| 869| 						prevHotkey = ev.hotkey;
| 870| 870| 					}
| 871| 871| 				}
|    | [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
| 866| 866| 						performGroup(sptr[2], sptr[3]);
| 867| 867| 
| 868| 868| 						doublePressTimer = now;
| 869|    |-						prevHotkey = ev.hotkey;
|    | 869|+					prevHotkey = ev.hotkey;
| 870| 870| 					}
| 871| 871| 				}
| 872| 872| 				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
| 867| 867| 
| 868| 868| 						doublePressTimer = now;
| 869| 869| 						prevHotkey = ev.hotkey;
| 870|    |-					}
|    | 870|+				}
| 871| 871| 				}
| 872| 872| 				break;
| 873| 873| 		}
|    | [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
| 868| 868| 						doublePressTimer = now;
| 869| 869| 						prevHotkey = ev.hotkey;
| 870| 870| 					}
| 871|    |-				}
|    | 871|+			}
| 872| 872| 				break;
| 873| 873| 		}
| 874| 874| 		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
| 869| 869| 						prevHotkey = ev.hotkey;
| 870| 870| 					}
| 871| 871| 				}
| 872|    |-				break;
|    | 872|+			break;
| 873| 873| 		}
| 874| 874| 		break;
| 875| 875| 
|    | [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
|1037|1037| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1038|1038| 
|1039|1039| 			if (placementSupport.mode === "wall")
|1040|    |-			{
|    |1040|+			
|1041|1041| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1042|1042| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1043|1043| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1044|1044| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1045|    |-			}
|    |1045|+			
|1046|1046| 			else
|1047|1047| 			{
|1048|1048| 				// cancel if not enough resources
|    | [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
|1306|1306| 	if (templateData.attack &&
|1307|1307| 		templateData.attack.Ranged &&
|1308|1308| 		templateData.attack.Ranged.maxRange)
|1309|    |-	{
|    |1309|+	
|1310|1310| 		// add attack information to display a good tooltip
|1311|1311| 		placementSupport.attack = templateData.attack;
|1312|    |-	}
|    |1312|+	
|1313|1313| }
|1314|1314| 
|1315|1315| // 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
|1373|1373| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1374|1374| 	{
|1375|1375| 		if (inputState == INPUT_BATCHTRAINING)
|1376|    |-		{
|    |1376|+		
|1377|1377| 			// Check if we are training in the same building(s) as the last batch
|1378|1378| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1379|1379| 			// If the order changed, we have a new selection and we should create a new batch.
|1406|1406| 			else if (!decrement)
|1407|1407| 				flushTrainingBatch();
|1408|1408| 				// fall through to create the new batch
|1409|    |-		}
|    |1409|+		
|1410|1410| 
|1411|1411| 		// Don't start a new batch if decrementing or unable to afford it.
|1412|1412| 		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
|1405|1405| 			// Otherwise start a new one
|1406|1406| 			else if (!decrement)
|1407|1407| 				flushTrainingBatch();
|1408|    |-				// fall through to create the new batch
|    |1408|+			// fall through to create the new batch
|1409|1409| 		}
|1410|1410| 
|1411|1411| 		// 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
|1484|1484| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1485|1485| 	{
|1486|1486| 		// Train as many full batches as we can
|1487|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1487|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1488|1488| 		Engine.PostNetworkCommand({
|1489|1489| 			"type": "train",
|1490|1490| 			"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
|1563|1563| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1564|1564| 
|1565|1565| 	// Reset the last idle unit, etc., if the selection type has changed.
|1566|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1566|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1567|1567| 		resetIdleUnit();
|1568|1568| 	lastIdleClasses = classes;
|1569|1569| 

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

binaries/data/mods/public/gui/session/input.js
| 228| »   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
| 242| »   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
| 459| »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
|1024| »   »   »   »   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
|1033| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 474| »   »   &&·(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
| 504| »   »   »   »   var·rect·=·updateBandbox(bandbox,·ev,·true);
|    | [NORMAL] JSHintBear:
|    | 'rect' is already defined.

binaries/data/mods/public/gui/session/input.js
| 507| »   »   »   »   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
| 664| »   »   »   »   »   var·queued·=·Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] JSHintBear:
|    | 'queued' is already defined.

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
|1174| »   if·(!ev.button·==·SDL_BUTTON_RIGHT)
|    | [NORMAL] JSHintBear:
|    | Confusing use of '!'.

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

The patch looks really good. I will test it soon.

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

Would be candy if C++ provides us the vector right away :-)

1164

I would have said target.distanceToSquared(FreehandSelection_InputLine[g_FreehandSelection_InputLine.length - 1]), but this one might be faster.
But then why does it actually square the number if we don't use euclidian distance anymore and just not use Math.abs?
This is only executed when sending a command and this only saves some microseconds I guess?

binaries/data/mods/public/simulation/helpers/Commands.js
158 ↗(On Diff #5829)

maybe it's just me, but I would inline the variables, so that there is less indirection

use abs instead of square

OptimusShepard marked 2 inline comments as done.Feb 21 2018, 10:26 PM
OptimusShepard added inline comments.
binaries/data/mods/public/gui/session/input.js
1164

yes you'r right, thx.

OptimusShepard marked an inline comment as done.Feb 21 2018, 10:26 PM

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

Linter detected issues:
Executing section Default...
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (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
| 174| 174| 		}
| 175| 175| 	}
| 176| 176| 	else if (placementSupport.mode === "wall")
| 177|    |-	{
|    | 177|+	
| 178| 178| 		if (placementSupport.wallSet && placementSupport.position)
| 179| 179| 		{
| 180| 180| 			// Fetch an updated list of snapping candidate entities
| 192| 192| 				"snapEntities": placementSupport.wallSnapEntities,	// snapping entities (towers) for starting a wall segment
| 193| 193| 			});
| 194| 194| 		}
| 195|    |-	}
|    | 195|+	
| 196| 196| 
| 197| 197| 	return false;
| 198| 198| }
|    | [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
| 281| 281| 	}
| 282| 282| 
| 283| 283| 	if (!updateBuildingPlacementPreview())
| 284|    |-	{
|    | 284|+	
| 285| 285| 		// invalid location - don't build it
| 286| 286| 		// TODO: play a sound?
| 287| 287| 		return false;
| 288|    |-	}
|    | 288|+	
| 289| 289| 
| 290| 290| 	var selection = g_Selection.toList();
| 291| 291| 
|    | [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
| 320| 320| 	}
| 321| 321| 
| 322| 322| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 323|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 323|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 324| 324| 	{
| 325| 325| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 326| 326| 		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
| 347| 347| 	// (this is somewhat non-ideal and hardcode-ish)
| 348| 348| 	var hasWallSegment = false;
| 349| 349| 	for (let piece of cmd.pieces)
| 350|    |-	{
|    | 350|+	
| 351| 351| 		if (piece.template != cmd.wallSet.templates.tower) // TODO: hardcode-ish :(
| 352| 352| 		{
| 353| 353| 			hasWallSegment = true;
| 354| 354| 			break;
| 355| 355| 		}
| 356|    |-	}
|    | 356|+	
| 357| 357| 
| 358| 358| 	if (hasWallSegment)
| 359| 359| 	{
|    | [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
| 470| 470| 	mouseIsOverObject = (hoveredObject != null);
| 471| 471| 
| 472| 472| 	// Close the menu when interacting with the game world
| 473|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 474|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 473|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 474|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 475| 475| 		closeMenu();
| 476| 476| 
| 477| 477| 	// 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
| 511| 511| 
| 512| 512| 				// Update the list of selected units
| 513| 513| 				if (Engine.HotkeyIsPressed("selection.add"))
| 514|    |-				{
|    | 514|+				
| 515| 515| 					g_Selection.addList(ents);
| 516|    |-				}
|    | 516|+				
| 517| 517| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 518| 518| 				{
| 519| 519| 					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
| 515| 515| 					g_Selection.addList(ents);
| 516| 516| 				}
| 517| 517| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 518|    |-				{
|    | 518|+				
| 519| 519| 					g_Selection.removeList(ents);
| 520|    |-				}
|    | 520|+				
| 521| 521| 				else
| 522| 522| 				{
| 523| 523| 					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
| 571| 571| 				// If shift is down, let the player continue placing another of the same building
| 572| 572| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 573| 573| 				if (tryPlaceBuilding(queued))
| 574|    |-				{
|    | 574|+				
| 575| 575| 					if (queued)
| 576| 576| 						inputState = INPUT_BUILDING_PLACEMENT;
| 577| 577| 					else
| 578| 578| 						inputState = INPUT_NORMAL;
| 579|    |-				}
|    | 579|+				
| 580| 580| 				else
| 581| 581| 				{
| 582| 582| 					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
| 578| 578| 						inputState = INPUT_NORMAL;
| 579| 579| 				}
| 580| 580| 				else
| 581|    |-				{
|    | 581|+				
| 582| 582| 					inputState = INPUT_BUILDING_PLACEMENT;
| 583|    |-				}
|    | 583|+				
| 584| 584| 				return true;
| 585| 585| 			}
| 586| 586| 			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
| 631| 631| 		// user to continue building walls.
| 632| 632| 		switch (ev.type)
| 633| 633| 		{
| 634|    |-			case "mousemotion":
|    | 634|+		case "mousemotion":
| 635| 635| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 636| 636| 
| 637| 637| 				// 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
| 632| 632| 		switch (ev.type)
| 633| 633| 		{
| 634| 634| 			case "mousemotion":
| 635|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 635|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 636| 636| 
| 637| 637| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 638| 638| 				// 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
| 634| 634| 			case "mousemotion":
| 635| 635| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 636| 636| 
| 637|    |-				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 637|+			// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 638| 638| 				// the ending point and the starting point to snap to.
| 639| 639| 				//
| 640| 640| 				// 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
| 635| 635| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 636| 636| 
| 637| 637| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 638|    |-				// the ending point and the starting point to snap to.
|    | 638|+			// the ending point and the starting point to snap to.
| 639| 639| 				//
| 640| 640| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 641| 641| 				// 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
| 636| 636| 
| 637| 637| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 638| 638| 				// the ending point and the starting point to snap to.
| 639|    |-				//
|    | 639|+			//
| 640| 640| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 641| 641| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 642| 642| 				// 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
| 637| 637| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 638| 638| 				// the ending point and the starting point to snap to.
| 639| 639| 				//
| 640|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 640|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 641| 641| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 642| 642| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 643| 643| 				// 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
| 638| 638| 				// the ending point and the starting point to snap to.
| 639| 639| 				//
| 640| 640| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 641|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 641|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 642| 642| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 643| 643| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 644| 644| 				// 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
| 639| 639| 				//
| 640| 640| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 641| 641| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 642|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 642|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 643| 643| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 644| 644| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 645| 645| 				// 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
| 640| 640| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 641| 641| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 642| 642| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 643|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 643|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 644| 644| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 645| 645| 				// points.
| 646| 646| 
|    | [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
| 641| 641| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 642| 642| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 643| 643| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 644|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 644|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 645| 645| 				// points.
| 646| 646| 
| 647| 647| 				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
| 642| 642| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 643| 643| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 644| 644| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 645|    |-				// points.
|    | 645|+			// points.
| 646| 646| 
| 647| 647| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 648| 648| 				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
| 644| 644| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 645| 645| 				// points.
| 646| 646| 
| 647|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 647|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 648| 648| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 649| 649| 
| 650| 650| 				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
| 645| 645| 				// points.
| 646| 646| 
| 647| 647| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 648|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 648|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 649| 649| 
| 650| 650| 				if (result && result.cost)
| 651| 651| 				{
|    | [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.wallSnapEntitiesIncludeOffscreen = true;
| 648| 648| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 649| 649| 
| 650|    |-				if (result && result.cost)
|    | 650|+			if (result && result.cost)
| 651| 651| 				{
| 652| 652| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 653| 653| 					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
| 648| 648| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 649| 649| 
| 650| 650| 				if (result && result.cost)
| 651|    |-				{
|    | 651|+			{
| 652| 652| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 653| 653| 					placementSupport.tooltipMessage = [
| 654| 654| 						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
| 649| 649| 
| 650| 650| 				if (result && result.cost)
| 651| 651| 				{
| 652|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 652|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 653| 653| 					placementSupport.tooltipMessage = [
| 654| 654| 						getEntityCostTooltip(result),
| 655| 655| 						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
| 650| 650| 				if (result && result.cost)
| 651| 651| 				{
| 652| 652| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 653|    |-					placementSupport.tooltipMessage = [
|    | 653|+				placementSupport.tooltipMessage = [
| 654| 654| 						getEntityCostTooltip(result),
| 655| 655| 						getNeededResourcesTooltip(neededResources)
| 656| 656| 					].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
| 651| 651| 				{
| 652| 652| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 653| 653| 					placementSupport.tooltipMessage = [
| 654|    |-						getEntityCostTooltip(result),
|    | 654|+					getEntityCostTooltip(result),
| 655| 655| 						getNeededResourcesTooltip(neededResources)
| 656| 656| 					].filter(tip => tip).join("\n");
| 657| 657| 				}
|    | [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
| 652| 652| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 653| 653| 					placementSupport.tooltipMessage = [
| 654| 654| 						getEntityCostTooltip(result),
| 655|    |-						getNeededResourcesTooltip(neededResources)
|    | 655|+					getNeededResourcesTooltip(neededResources)
| 656| 656| 					].filter(tip => tip).join("\n");
| 657| 657| 				}
| 658| 658| 
|    | [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
| 653| 653| 					placementSupport.tooltipMessage = [
| 654| 654| 						getEntityCostTooltip(result),
| 655| 655| 						getNeededResourcesTooltip(neededResources)
| 656|    |-					].filter(tip => tip).join("\n");
|    | 656|+				].filter(tip => tip).join("\n");
| 657| 657| 				}
| 658| 658| 
| 659| 659| 				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
| 654| 654| 						getEntityCostTooltip(result),
| 655| 655| 						getNeededResourcesTooltip(neededResources)
| 656| 656| 					].filter(tip => tip).join("\n");
| 657|    |-				}
|    | 657|+			}
| 658| 658| 
| 659| 659| 				break;
| 660| 660| 
|    | [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| 					].filter(tip => tip).join("\n");
| 657| 657| 				}
| 658| 658| 
| 659|    |-				break;
|    | 659|+			break;
| 660| 660| 
| 661| 661| 			case "mousebuttondown":
| 662| 662| 				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
| 658| 658| 
| 659| 659| 				break;
| 660| 660| 
| 661|    |-			case "mousebuttondown":
|    | 661|+		case "mousebuttondown":
| 662| 662| 				if (ev.button == SDL_BUTTON_LEFT)
| 663| 663| 				{
| 664| 664| 					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
| 659| 659| 				break;
| 660| 660| 
| 661| 661| 			case "mousebuttondown":
| 662|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 662|+			if (ev.button == SDL_BUTTON_LEFT)
| 663| 663| 				{
| 664| 664| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 665| 665| 					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
| 660| 660| 
| 661| 661| 			case "mousebuttondown":
| 662| 662| 				if (ev.button == SDL_BUTTON_LEFT)
| 663|    |-				{
|    | 663|+			{
| 664| 664| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 665| 665| 					if (tryPlaceWall(queued))
| 666| 666| 					{
|    | [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| 			case "mousebuttondown":
| 662| 662| 				if (ev.button == SDL_BUTTON_LEFT)
| 663| 663| 				{
| 664|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 664|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 665| 665| 					if (tryPlaceWall(queued))
| 666| 666| 					{
| 667| 667| 						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
| 662| 662| 				if (ev.button == SDL_BUTTON_LEFT)
| 663| 663| 				{
| 664| 664| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 665|    |-					if (tryPlaceWall(queued))
|    | 665|+				if (tryPlaceWall(queued))
| 666| 666| 					{
| 667| 667| 						if (queued)
| 668| 668| 						{
|    | [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
| 663| 663| 				{
| 664| 664| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 665| 665| 					if (tryPlaceWall(queued))
| 666|    |-					{
|    | 666|+					
| 667| 667| 						if (queued)
| 668| 668| 						{
| 669| 669| 							// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.Reset();
| 678| 678| 							inputState = INPUT_NORMAL;
| 679| 679| 						}
| 680|    |-					}
|    | 680|+					
| 681| 681| 					else
| 682| 682| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 683| 683| 
|    | [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
| 663| 663| 				{
| 664| 664| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 665| 665| 					if (tryPlaceWall(queued))
| 666|    |-					{
|    | 666|+				{
| 667| 667| 						if (queued)
| 668| 668| 						{
| 669| 669| 							// 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
| 664| 664| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 665| 665| 					if (tryPlaceWall(queued))
| 666| 666| 					{
| 667|    |-						if (queued)
|    | 667|+					if (queued)
| 668| 668| 						{
| 669| 669| 							// continue building, just set a new starting position where we left off
| 670| 670| 							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
| 665| 665| 					if (tryPlaceWall(queued))
| 666| 666| 					{
| 667| 667| 						if (queued)
| 668|    |-						{
|    | 668|+					{
| 669| 669| 							// continue building, just set a new starting position where we left off
| 670| 670| 							placementSupport.position = placementSupport.wallEndPosition;
| 671| 671| 							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
| 666| 666| 					{
| 667| 667| 						if (queued)
| 668| 668| 						{
| 669|    |-							// continue building, just set a new starting position where we left off
|    | 669|+						// continue building, just set a new starting position where we left off
| 670| 670| 							placementSupport.position = placementSupport.wallEndPosition;
| 671| 671| 							placementSupport.wallEndPosition = undefined;
| 672| 672| 
|    | [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
| 667| 667| 						if (queued)
| 668| 668| 						{
| 669| 669| 							// continue building, just set a new starting position where we left off
| 670|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 670|+						placementSupport.position = placementSupport.wallEndPosition;
| 671| 671| 							placementSupport.wallEndPosition = undefined;
| 672| 672| 
| 673| 673| 							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
| 668| 668| 						{
| 669| 669| 							// continue building, just set a new starting position where we left off
| 670| 670| 							placementSupport.position = placementSupport.wallEndPosition;
| 671|    |-							placementSupport.wallEndPosition = undefined;
|    | 671|+						placementSupport.wallEndPosition = undefined;
| 672| 672| 
| 673| 673| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 674| 674| 						}
|    | [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
| 670| 670| 							placementSupport.position = placementSupport.wallEndPosition;
| 671| 671| 							placementSupport.wallEndPosition = undefined;
| 672| 672| 
| 673|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 673|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 674| 674| 						}
| 675| 675| 						else
| 676| 676| 						{
|    | [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
| 671| 671| 							placementSupport.wallEndPosition = undefined;
| 672| 672| 
| 673| 673| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 674|    |-						}
|    | 674|+					}
| 675| 675| 						else
| 676| 676| 						{
| 677| 677| 							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
| 672| 672| 
| 673| 673| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 674| 674| 						}
| 675|    |-						else
|    | 675|+					else
| 676| 676| 						{
| 677| 677| 							placementSupport.Reset();
| 678| 678| 							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
| 673| 673| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 674| 674| 						}
| 675| 675| 						else
| 676|    |-						{
|    | 676|+					{
| 677| 677| 							placementSupport.Reset();
| 678| 678| 							inputState = INPUT_NORMAL;
| 679| 679| 						}
|    | [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
| 674| 674| 						}
| 675| 675| 						else
| 676| 676| 						{
| 677|    |-							placementSupport.Reset();
|    | 677|+						placementSupport.Reset();
| 678| 678| 							inputState = INPUT_NORMAL;
| 679| 679| 						}
| 680| 680| 					}
|    | [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
| 675| 675| 						else
| 676| 676| 						{
| 677| 677| 							placementSupport.Reset();
| 678|    |-							inputState = INPUT_NORMAL;
|    | 678|+						inputState = INPUT_NORMAL;
| 679| 679| 						}
| 680| 680| 					}
| 681| 681| 					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
| 676| 676| 						{
| 677| 677| 							placementSupport.Reset();
| 678| 678| 							inputState = INPUT_NORMAL;
| 679|    |-						}
|    | 679|+					}
| 680| 680| 					}
| 681| 681| 					else
| 682| 682| 						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
| 677| 677| 							placementSupport.Reset();
| 678| 678| 							inputState = INPUT_NORMAL;
| 679| 679| 						}
| 680|    |-					}
|    | 680|+				}
| 681| 681| 					else
| 682| 682| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 683| 683| 
|    | [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
| 678| 678| 							inputState = INPUT_NORMAL;
| 679| 679| 						}
| 680| 680| 					}
| 681|    |-					else
|    | 681|+				else
| 682| 682| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 683| 683| 
| 684| 684| 					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
| 679| 679| 						}
| 680| 680| 					}
| 681| 681| 					else
| 682|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 682|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 683| 683| 
| 684| 684| 					updateBuildingPlacementPreview();
| 685| 685| 					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
| 681| 681| 					else
| 682| 682| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 683| 683| 
| 684|    |-					updateBuildingPlacementPreview();
|    | 684|+				updateBuildingPlacementPreview();
| 685| 685| 					return true;
| 686| 686| 				}
| 687| 687| 				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
| 682| 682| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 683| 683| 
| 684| 684| 					updateBuildingPlacementPreview();
| 685|    |-					return true;
|    | 685|+				return true;
| 686| 686| 				}
| 687| 687| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 688| 688| 				{
|    | [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
| 683| 683| 
| 684| 684| 					updateBuildingPlacementPreview();
| 685| 685| 					return true;
| 686|    |-				}
|    | 686|+			}
| 687| 687| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 688| 688| 				{
| 689| 689| 					// reset to normal input mode
|    | [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
| 684| 684| 					updateBuildingPlacementPreview();
| 685| 685| 					return true;
| 686| 686| 				}
| 687|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 687|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 688| 688| 				{
| 689| 689| 					// reset to normal input mode
| 690| 690| 					placementSupport.Reset();
|    | [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
| 685| 685| 					return true;
| 686| 686| 				}
| 687| 687| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 688|    |-				{
|    | 688|+			{
| 689| 689| 					// reset to normal input mode
| 690| 690| 					placementSupport.Reset();
| 691| 691| 					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
| 686| 686| 				}
| 687| 687| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 688| 688| 				{
| 689|    |-					// reset to normal input mode
|    | 689|+				// reset to normal input mode
| 690| 690| 					placementSupport.Reset();
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 
|    | [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
| 687| 687| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 688| 688| 				{
| 689| 689| 					// reset to normal input mode
| 690|    |-					placementSupport.Reset();
|    | 690|+				placementSupport.Reset();
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 
| 693| 693| 					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
| 688| 688| 				{
| 689| 689| 					// reset to normal input mode
| 690| 690| 					placementSupport.Reset();
| 691|    |-					updateBuildingPlacementPreview();
|    | 691|+				updateBuildingPlacementPreview();
| 692| 692| 
| 693| 693| 					inputState = INPUT_NORMAL;
| 694| 694| 					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
| 690| 690| 					placementSupport.Reset();
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 
| 693|    |-					inputState = INPUT_NORMAL;
|    | 693|+				inputState = INPUT_NORMAL;
| 694| 694| 					return true;
| 695| 695| 				}
| 696| 696| 				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
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 
| 693| 693| 					inputState = INPUT_NORMAL;
| 694|    |-					return true;
|    | 694|+				return true;
| 695| 695| 				}
| 696| 696| 				break;
| 697| 697| 		}
|    | [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
| 692| 692| 
| 693| 693| 					inputState = INPUT_NORMAL;
| 694| 694| 					return true;
| 695|    |-				}
|    | 695|+			}
| 696| 696| 				break;
| 697| 697| 		}
| 698| 698| 		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
| 693| 693| 					inputState = INPUT_NORMAL;
| 694| 694| 					return true;
| 695| 695| 				}
| 696|    |-				break;
|    | 696|+			break;
| 697| 697| 		}
| 698| 698| 		break;
| 699| 699| 
|    | [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
| 703| 703| 		case "mousemotion":
| 704| 704| 			let maxDragDelta = 16;
| 705| 705| 			if (g_DragStart.distanceTo(ev) >= maxDragDelta)
| 706|    |-			{
|    | 706|+			
| 707| 707| 				// Rotate in the direction of the mouse
| 708| 708| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 709|    |-			}
|    | 709|+			
| 710| 710| 			else
| 711| 711| 			{
| 712| 712| 				// 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
| 708| 708| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 709| 709| 			}
| 710| 710| 			else
| 711|    |-			{
|    | 711|+			
| 712| 712| 				// If the mouse is near the center, snap back to the default orientation
| 713| 713| 				placementSupport.SetDefaultAngle();
| 714|    |-			}
|    | 714|+			
| 715| 715| 
| 716| 716| 			var snapData = Engine.GuiInterfaceCall("GetFoundationSnapData", {
| 717| 717| 				"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
| 734| 734| 				// If shift is down, let the player continue placing another of the same building
| 735| 735| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 736| 736| 				if (tryPlaceBuilding(queued))
| 737|    |-				{
|    | 737|+				
| 738| 738| 					if (queued)
| 739| 739| 						inputState = INPUT_BUILDING_PLACEMENT;
| 740| 740| 					else
| 741| 741| 						inputState = INPUT_NORMAL;
| 742|    |-				}
|    | 742|+				
| 743| 743| 				else
| 744| 744| 				{
| 745| 745| 					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
| 741| 741| 						inputState = INPUT_NORMAL;
| 742| 742| 				}
| 743| 743| 				else
| 744|    |-				{
|    | 744|+				
| 745| 745| 					inputState = INPUT_BUILDING_PLACEMENT;
| 746|    |-				}
|    | 746|+				
| 747| 747| 				return true;
| 748| 748| 			}
| 749| 749| 			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
| 790| 790| 
| 791| 791| 	// Handle the time-warp testing features, restricted to single-player
| 792| 792| 	if (!g_IsNetworked && Engine.GetGUIObjectByName("devTimeWarp").checked)
| 793|    |-	{
|    | 793|+	
| 794| 794| 		if (ev.type == "hotkeydown" && ev.hotkey == "session.timewarp.fastforward")
| 795| 795| 			Engine.SetSimRate(20.0);
| 796| 796| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.fastforward")
| 797| 797| 			Engine.SetSimRate(1.0);
| 798| 798| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.rewind")
| 799| 799| 			Engine.RewindTimeWarp();
| 800|    |-	}
|    | 800|+	
| 801| 801| 
| 802| 802| 	if (ev.hotkey == "session.highlightguarding")
| 803| 803| 	{
|    | [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
| 849| 849| 			break;
| 850| 850| 
| 851| 851| 		case "hotkeydown":
| 852|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 852|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 853| 853| 				{
| 854| 854| 					let now = Date.now();
| 855| 855| 					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
| 850| 850| 
| 851| 851| 		case "hotkeydown":
| 852| 852| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 853|    |-				{
|    | 853|+			{
| 854| 854| 					let now = Date.now();
| 855| 855| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 856| 856| 					{
|    | [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
| 851| 851| 		case "hotkeydown":
| 852| 852| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 853| 853| 				{
| 854|    |-					let now = Date.now();
|    | 854|+				let now = Date.now();
| 855| 855| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 856| 856| 					{
| 857| 857| 						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
| 852| 852| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 853| 853| 				{
| 854| 854| 					let now = Date.now();
| 855|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 855|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 856| 856| 					{
| 857| 857| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 858| 858| 						{
|    | [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
| 853| 853| 				{
| 854| 854| 					let now = Date.now();
| 855| 855| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 856|    |-					{
|    | 856|+				{
| 857| 857| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 858| 858| 						{
| 859| 859| 							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
| 854| 854| 					let now = Date.now();
| 855| 855| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 856| 856| 					{
| 857|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 857|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 858| 858| 						{
| 859| 859| 							var sptr = ev.hotkey.split(".");
| 860| 860| 							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
| 855| 855| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 856| 856| 					{
| 857| 857| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 858|    |-						{
|    | 858|+					{
| 859| 859| 							var sptr = ev.hotkey.split(".");
| 860| 860| 							performGroup("snap", sptr[3]);
| 861| 861| 						}
|    | [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
| 856| 856| 					{
| 857| 857| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 858| 858| 						{
| 859|    |-							var sptr = ev.hotkey.split(".");
|    | 859|+						var sptr = ev.hotkey.split(".");
| 860| 860| 							performGroup("snap", sptr[3]);
| 861| 861| 						}
| 862| 862| 					}
|    | [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
| 857| 857| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 858| 858| 						{
| 859| 859| 							var sptr = ev.hotkey.split(".");
| 860|    |-							performGroup("snap", sptr[3]);
|    | 860|+						performGroup("snap", sptr[3]);
| 861| 861| 						}
| 862| 862| 					}
| 863| 863| 					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
| 858| 858| 						{
| 859| 859| 							var sptr = ev.hotkey.split(".");
| 860| 860| 							performGroup("snap", sptr[3]);
| 861|    |-						}
|    | 861|+					}
| 862| 862| 					}
| 863| 863| 					else
| 864| 864| 					{
|    | [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
| 859| 859| 							var sptr = ev.hotkey.split(".");
| 860| 860| 							performGroup("snap", sptr[3]);
| 861| 861| 						}
| 862|    |-					}
|    | 862|+				}
| 863| 863| 					else
| 864| 864| 					{
| 865| 865| 						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
| 860| 860| 							performGroup("snap", sptr[3]);
| 861| 861| 						}
| 862| 862| 					}
| 863|    |-					else
|    | 863|+				else
| 864| 864| 					{
| 865| 865| 						var sptr = ev.hotkey.split(".");
| 866| 866| 						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
| 861| 861| 						}
| 862| 862| 					}
| 863| 863| 					else
| 864|    |-					{
|    | 864|+				{
| 865| 865| 						var sptr = ev.hotkey.split(".");
| 866| 866| 						performGroup(sptr[2], sptr[3]);
| 867| 867| 
|    | [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
| 862| 862| 					}
| 863| 863| 					else
| 864| 864| 					{
| 865|    |-						var sptr = ev.hotkey.split(".");
|    | 865|+					var sptr = ev.hotkey.split(".");
| 866| 866| 						performGroup(sptr[2], sptr[3]);
| 867| 867| 
| 868| 868| 						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
| 863| 863| 					else
| 864| 864| 					{
| 865| 865| 						var sptr = ev.hotkey.split(".");
| 866|    |-						performGroup(sptr[2], sptr[3]);
|    | 866|+					performGroup(sptr[2], sptr[3]);
| 867| 867| 
| 868| 868| 						doublePressTimer = now;
| 869| 869| 						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
| 865| 865| 						var sptr = ev.hotkey.split(".");
| 866| 866| 						performGroup(sptr[2], sptr[3]);
| 867| 867| 
| 868|    |-						doublePressTimer = now;
|    | 868|+					doublePressTimer = now;
| 869| 869| 						prevHotkey = ev.hotkey;
| 870| 870| 					}
| 871| 871| 				}
|    | [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
| 866| 866| 						performGroup(sptr[2], sptr[3]);
| 867| 867| 
| 868| 868| 						doublePressTimer = now;
| 869|    |-						prevHotkey = ev.hotkey;
|    | 869|+					prevHotkey = ev.hotkey;
| 870| 870| 					}
| 871| 871| 				}
| 872| 872| 				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
| 867| 867| 
| 868| 868| 						doublePressTimer = now;
| 869| 869| 						prevHotkey = ev.hotkey;
| 870|    |-					}
|    | 870|+				}
| 871| 871| 				}
| 872| 872| 				break;
| 873| 873| 		}
|    | [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
| 868| 868| 						doublePressTimer = now;
| 869| 869| 						prevHotkey = ev.hotkey;
| 870| 870| 					}
| 871|    |-				}
|    | 871|+			}
| 872| 872| 				break;
| 873| 873| 		}
| 874| 874| 		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
| 869| 869| 						prevHotkey = ev.hotkey;
| 870| 870| 					}
| 871| 871| 				}
| 872|    |-				break;
|    | 872|+			break;
| 873| 873| 		}
| 874| 874| 		break;
| 875| 875| 
|    | [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
|1037|1037| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1038|1038| 
|1039|1039| 			if (placementSupport.mode === "wall")
|1040|    |-			{
|    |1040|+			
|1041|1041| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1042|1042| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1043|1043| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1044|1044| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1045|    |-			}
|    |1045|+			
|1046|1046| 			else
|1047|1047| 			{
|1048|1048| 				// cancel if not enough resources
|    | [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
|1305|1305| 	if (templateData.attack &&
|1306|1306| 		templateData.attack.Ranged &&
|1307|1307| 		templateData.attack.Ranged.maxRange)
|1308|    |-	{
|    |1308|+	
|1309|1309| 		// add attack information to display a good tooltip
|1310|1310| 		placementSupport.attack = templateData.attack;
|1311|    |-	}
|    |1311|+	
|1312|1312| }
|1313|1313| 
|1314|1314| // 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
|1372|1372| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1373|1373| 	{
|1374|1374| 		if (inputState == INPUT_BATCHTRAINING)
|1375|    |-		{
|    |1375|+		
|1376|1376| 			// Check if we are training in the same building(s) as the last batch
|1377|1377| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1378|1378| 			// If the order changed, we have a new selection and we should create a new batch.
|1405|1405| 			else if (!decrement)
|1406|1406| 				flushTrainingBatch();
|1407|1407| 				// fall through to create the new batch
|1408|    |-		}
|    |1408|+		
|1409|1409| 
|1410|1410| 		// Don't start a new batch if decrementing or unable to afford it.
|1411|1411| 		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
|1404|1404| 			// Otherwise start a new one
|1405|1405| 			else if (!decrement)
|1406|1406| 				flushTrainingBatch();
|1407|    |-				// fall through to create the new batch
|    |1407|+			// fall through to create the new batch
|1408|1408| 		}
|1409|1409| 
|1410|1410| 		// 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
|1483|1483| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1484|1484| 	{
|1485|1485| 		// Train as many full batches as we can
|1486|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1486|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1487|1487| 		Engine.PostNetworkCommand({
|1488|1488| 			"type": "train",
|1489|1489| 			"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
|1562|1562| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1563|1563| 
|1564|1564| 	// Reset the last idle unit, etc., if the selection type has changed.
|1565|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1565|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1566|1566| 		resetIdleUnit();
|1567|1567| 	lastIdleClasses = classes;
|1568|1568| 

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

binaries/data/mods/public/gui/session/input.js
| 228| »   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
| 242| »   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
| 459| »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
|1024| »   »   »   »   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
|1033| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 474| »   »   &&·(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
| 504| »   »   »   »   var·rect·=·updateBandbox(bandbox,·ev,·true);
|    | [NORMAL] JSHintBear:
|    | 'rect' is already defined.

binaries/data/mods/public/gui/session/input.js
| 507| »   »   »   »   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
| 664| »   »   »   »   »   var·queued·=·Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] JSHintBear:
|    | 'queued' is already defined.

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
|1173| »   if·(!ev.button·==·SDL_BUTTON_RIGHT)
|    | [NORMAL] JSHintBear:
|    | Confusing use of '!'.

binaries/data/mods/public/simulation/helpers/Commands.js
| 914| »   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
| 914| »   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
| 914| »   var·ids·=·[·id·for·(id·in·members)·];
|    | [NORMAL] JSHintBear:
|    | Expected 'for' and instead saw 'id'.

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1376| »   »   var·piece·=·pieces[j];
|    | [NORMAL] JSHintBear:
|    | 'piece' is already defined.

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1497| »   »   »   &&·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
|1523| »   »   »   »   »   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.

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

bb added inline comments.Feb 24 2018, 7:14 PM
binaries/data/mods/public/gui/session/input.js
1014

square

1162–1163

wasn't the argument to change these lines in a previous iteration that it is a different distance for different directions?

1208

missing points and is that comma correct?

1209

technically check unneeded, I am fine with keeping them (yellers may yell)

1214–1217

inline

changing some math function

OptimusShepard marked 6 inline comments as done.Feb 25 2018, 2:23 PM
OptimusShepard added inline comments.Feb 25 2018, 2:26 PM
binaries/data/mods/public/gui/session/input.js
1014

In my opinion vector are much better for readabilty. It also isn't performance criticaly. But I will change it if you and elexis come to an agreement.

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

Linter detected issues:
Executing section Default...
Executing section Source...
Executing section JS...

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
|1362| »   »   var·piece·=·pieces[j];
|    | [NORMAL] JSHintBear:
|    | 'piece' is already defined.

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1483| »   »   »   &&·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
|1509| »   »   »   »   »   var·cmpUnitAI·=·Engine.QueryInterface(ent,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitAI' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1534| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [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
| 174| 174| 		}
| 175| 175| 	}
| 176| 176| 	else if (placementSupport.mode === "wall")
| 177|    |-	{
|    | 177|+	
| 178| 178| 		if (placementSupport.wallSet && placementSupport.position)
| 179| 179| 		{
| 180| 180| 			// Fetch an updated list of snapping candidate entities
| 192| 192| 				"snapEntities": placementSupport.wallSnapEntities,	// snapping entities (towers) for starting a wall segment
| 193| 193| 			});
| 194| 194| 		}
| 195|    |-	}
|    | 195|+	
| 196| 196| 
| 197| 197| 	return false;
| 198| 198| }
|    | [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
| 281| 281| 	}
| 282| 282| 
| 283| 283| 	if (!updateBuildingPlacementPreview())
| 284|    |-	{
|    | 284|+	
| 285| 285| 		// invalid location - don't build it
| 286| 286| 		// TODO: play a sound?
| 287| 287| 		return false;
| 288|    |-	}
|    | 288|+	
| 289| 289| 
| 290| 290| 	var selection = g_Selection.toList();
| 291| 291| 
|    | [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
| 320| 320| 	}
| 321| 321| 
| 322| 322| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 323|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 323|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 324| 324| 	{
| 325| 325| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 326| 326| 		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
| 347| 347| 	// (this is somewhat non-ideal and hardcode-ish)
| 348| 348| 	var hasWallSegment = false;
| 349| 349| 	for (let piece of cmd.pieces)
| 350|    |-	{
|    | 350|+	
| 351| 351| 		if (piece.template != cmd.wallSet.templates.tower) // TODO: hardcode-ish :(
| 352| 352| 		{
| 353| 353| 			hasWallSegment = true;
| 354| 354| 			break;
| 355| 355| 		}
| 356|    |-	}
|    | 356|+	
| 357| 357| 
| 358| 358| 	if (hasWallSegment)
| 359| 359| 	{
|    | [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
| 470| 470| 	mouseIsOverObject = (hoveredObject != null);
| 471| 471| 
| 472| 472| 	// Close the menu when interacting with the game world
| 473|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 474|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 473|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 474|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 475| 475| 		closeMenu();
| 476| 476| 
| 477| 477| 	// 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
| 511| 511| 
| 512| 512| 				// Update the list of selected units
| 513| 513| 				if (Engine.HotkeyIsPressed("selection.add"))
| 514|    |-				{
|    | 514|+				
| 515| 515| 					g_Selection.addList(ents);
| 516|    |-				}
|    | 516|+				
| 517| 517| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 518| 518| 				{
| 519| 519| 					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
| 515| 515| 					g_Selection.addList(ents);
| 516| 516| 				}
| 517| 517| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 518|    |-				{
|    | 518|+				
| 519| 519| 					g_Selection.removeList(ents);
| 520|    |-				}
|    | 520|+				
| 521| 521| 				else
| 522| 522| 				{
| 523| 523| 					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
| 571| 571| 				// If shift is down, let the player continue placing another of the same building
| 572| 572| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 573| 573| 				if (tryPlaceBuilding(queued))
| 574|    |-				{
|    | 574|+				
| 575| 575| 					if (queued)
| 576| 576| 						inputState = INPUT_BUILDING_PLACEMENT;
| 577| 577| 					else
| 578| 578| 						inputState = INPUT_NORMAL;
| 579|    |-				}
|    | 579|+				
| 580| 580| 				else
| 581| 581| 				{
| 582| 582| 					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
| 578| 578| 						inputState = INPUT_NORMAL;
| 579| 579| 				}
| 580| 580| 				else
| 581|    |-				{
|    | 581|+				
| 582| 582| 					inputState = INPUT_BUILDING_PLACEMENT;
| 583|    |-				}
|    | 583|+				
| 584| 584| 				return true;
| 585| 585| 			}
| 586| 586| 			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
| 631| 631| 		// user to continue building walls.
| 632| 632| 		switch (ev.type)
| 633| 633| 		{
| 634|    |-			case "mousemotion":
|    | 634|+		case "mousemotion":
| 635| 635| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 636| 636| 
| 637| 637| 				// 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
| 632| 632| 		switch (ev.type)
| 633| 633| 		{
| 634| 634| 			case "mousemotion":
| 635|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 635|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 636| 636| 
| 637| 637| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 638| 638| 				// 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
| 634| 634| 			case "mousemotion":
| 635| 635| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 636| 636| 
| 637|    |-				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 637|+			// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 638| 638| 				// the ending point and the starting point to snap to.
| 639| 639| 				//
| 640| 640| 				// 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
| 635| 635| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 636| 636| 
| 637| 637| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 638|    |-				// the ending point and the starting point to snap to.
|    | 638|+			// the ending point and the starting point to snap to.
| 639| 639| 				//
| 640| 640| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 641| 641| 				// 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
| 636| 636| 
| 637| 637| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 638| 638| 				// the ending point and the starting point to snap to.
| 639|    |-				//
|    | 639|+			//
| 640| 640| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 641| 641| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 642| 642| 				// 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
| 637| 637| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 638| 638| 				// the ending point and the starting point to snap to.
| 639| 639| 				//
| 640|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 640|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 641| 641| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 642| 642| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 643| 643| 				// 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
| 638| 638| 				// the ending point and the starting point to snap to.
| 639| 639| 				//
| 640| 640| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 641|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 641|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 642| 642| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 643| 643| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 644| 644| 				// 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
| 639| 639| 				//
| 640| 640| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 641| 641| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 642|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 642|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 643| 643| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 644| 644| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 645| 645| 				// 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
| 640| 640| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 641| 641| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 642| 642| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 643|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 643|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 644| 644| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 645| 645| 				// points.
| 646| 646| 
|    | [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
| 641| 641| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 642| 642| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 643| 643| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 644|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 644|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 645| 645| 				// points.
| 646| 646| 
| 647| 647| 				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
| 642| 642| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 643| 643| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 644| 644| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 645|    |-				// points.
|    | 645|+			// points.
| 646| 646| 
| 647| 647| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 648| 648| 				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
| 644| 644| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 645| 645| 				// points.
| 646| 646| 
| 647|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 647|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 648| 648| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 649| 649| 
| 650| 650| 				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
| 645| 645| 				// points.
| 646| 646| 
| 647| 647| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 648|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 648|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 649| 649| 
| 650| 650| 				if (result && result.cost)
| 651| 651| 				{
|    | [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.wallSnapEntitiesIncludeOffscreen = true;
| 648| 648| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 649| 649| 
| 650|    |-				if (result && result.cost)
|    | 650|+			if (result && result.cost)
| 651| 651| 				{
| 652| 652| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 653| 653| 					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
| 648| 648| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 649| 649| 
| 650| 650| 				if (result && result.cost)
| 651|    |-				{
|    | 651|+			{
| 652| 652| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 653| 653| 					placementSupport.tooltipMessage = [
| 654| 654| 						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
| 649| 649| 
| 650| 650| 				if (result && result.cost)
| 651| 651| 				{
| 652|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 652|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 653| 653| 					placementSupport.tooltipMessage = [
| 654| 654| 						getEntityCostTooltip(result),
| 655| 655| 						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
| 650| 650| 				if (result && result.cost)
| 651| 651| 				{
| 652| 652| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 653|    |-					placementSupport.tooltipMessage = [
|    | 653|+				placementSupport.tooltipMessage = [
| 654| 654| 						getEntityCostTooltip(result),
| 655| 655| 						getNeededResourcesTooltip(neededResources)
| 656| 656| 					].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
| 651| 651| 				{
| 652| 652| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 653| 653| 					placementSupport.tooltipMessage = [
| 654|    |-						getEntityCostTooltip(result),
|    | 654|+					getEntityCostTooltip(result),
| 655| 655| 						getNeededResourcesTooltip(neededResources)
| 656| 656| 					].filter(tip => tip).join("\n");
| 657| 657| 				}
|    | [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
| 652| 652| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 653| 653| 					placementSupport.tooltipMessage = [
| 654| 654| 						getEntityCostTooltip(result),
| 655|    |-						getNeededResourcesTooltip(neededResources)
|    | 655|+					getNeededResourcesTooltip(neededResources)
| 656| 656| 					].filter(tip => tip).join("\n");
| 657| 657| 				}
| 658| 658| 
|    | [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
| 653| 653| 					placementSupport.tooltipMessage = [
| 654| 654| 						getEntityCostTooltip(result),
| 655| 655| 						getNeededResourcesTooltip(neededResources)
| 656|    |-					].filter(tip => tip).join("\n");
|    | 656|+				].filter(tip => tip).join("\n");
| 657| 657| 				}
| 658| 658| 
| 659| 659| 				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
| 654| 654| 						getEntityCostTooltip(result),
| 655| 655| 						getNeededResourcesTooltip(neededResources)
| 656| 656| 					].filter(tip => tip).join("\n");
| 657|    |-				}
|    | 657|+			}
| 658| 658| 
| 659| 659| 				break;
| 660| 660| 
|    | [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| 					].filter(tip => tip).join("\n");
| 657| 657| 				}
| 658| 658| 
| 659|    |-				break;
|    | 659|+			break;
| 660| 660| 
| 661| 661| 			case "mousebuttondown":
| 662| 662| 				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
| 658| 658| 
| 659| 659| 				break;
| 660| 660| 
| 661|    |-			case "mousebuttondown":
|    | 661|+		case "mousebuttondown":
| 662| 662| 				if (ev.button == SDL_BUTTON_LEFT)
| 663| 663| 				{
| 664| 664| 					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
| 659| 659| 				break;
| 660| 660| 
| 661| 661| 			case "mousebuttondown":
| 662|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 662|+			if (ev.button == SDL_BUTTON_LEFT)
| 663| 663| 				{
| 664| 664| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 665| 665| 					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
| 660| 660| 
| 661| 661| 			case "mousebuttondown":
| 662| 662| 				if (ev.button == SDL_BUTTON_LEFT)
| 663|    |-				{
|    | 663|+			{
| 664| 664| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 665| 665| 					if (tryPlaceWall(queued))
| 666| 666| 					{
|    | [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| 			case "mousebuttondown":
| 662| 662| 				if (ev.button == SDL_BUTTON_LEFT)
| 663| 663| 				{
| 664|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 664|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 665| 665| 					if (tryPlaceWall(queued))
| 666| 666| 					{
| 667| 667| 						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
| 662| 662| 				if (ev.button == SDL_BUTTON_LEFT)
| 663| 663| 				{
| 664| 664| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 665|    |-					if (tryPlaceWall(queued))
|    | 665|+				if (tryPlaceWall(queued))
| 666| 666| 					{
| 667| 667| 						if (queued)
| 668| 668| 						{
|    | [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
| 663| 663| 				{
| 664| 664| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 665| 665| 					if (tryPlaceWall(queued))
| 666|    |-					{
|    | 666|+					
| 667| 667| 						if (queued)
| 668| 668| 						{
| 669| 669| 							// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.Reset();
| 678| 678| 							inputState = INPUT_NORMAL;
| 679| 679| 						}
| 680|    |-					}
|    | 680|+					
| 681| 681| 					else
| 682| 682| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 683| 683| 
|    | [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
| 663| 663| 				{
| 664| 664| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 665| 665| 					if (tryPlaceWall(queued))
| 666|    |-					{
|    | 666|+				{
| 667| 667| 						if (queued)
| 668| 668| 						{
| 669| 669| 							// 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
| 664| 664| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 665| 665| 					if (tryPlaceWall(queued))
| 666| 666| 					{
| 667|    |-						if (queued)
|    | 667|+					if (queued)
| 668| 668| 						{
| 669| 669| 							// continue building, just set a new starting position where we left off
| 670| 670| 							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
| 665| 665| 					if (tryPlaceWall(queued))
| 666| 666| 					{
| 667| 667| 						if (queued)
| 668|    |-						{
|    | 668|+					{
| 669| 669| 							// continue building, just set a new starting position where we left off
| 670| 670| 							placementSupport.position = placementSupport.wallEndPosition;
| 671| 671| 							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
| 666| 666| 					{
| 667| 667| 						if (queued)
| 668| 668| 						{
| 669|    |-							// continue building, just set a new starting position where we left off
|    | 669|+						// continue building, just set a new starting position where we left off
| 670| 670| 							placementSupport.position = placementSupport.wallEndPosition;
| 671| 671| 							placementSupport.wallEndPosition = undefined;
| 672| 672| 
|    | [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
| 667| 667| 						if (queued)
| 668| 668| 						{
| 669| 669| 							// continue building, just set a new starting position where we left off
| 670|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 670|+						placementSupport.position = placementSupport.wallEndPosition;
| 671| 671| 							placementSupport.wallEndPosition = undefined;
| 672| 672| 
| 673| 673| 							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
| 668| 668| 						{
| 669| 669| 							// continue building, just set a new starting position where we left off
| 670| 670| 							placementSupport.position = placementSupport.wallEndPosition;
| 671|    |-							placementSupport.wallEndPosition = undefined;
|    | 671|+						placementSupport.wallEndPosition = undefined;
| 672| 672| 
| 673| 673| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 674| 674| 						}
|    | [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
| 670| 670| 							placementSupport.position = placementSupport.wallEndPosition;
| 671| 671| 							placementSupport.wallEndPosition = undefined;
| 672| 672| 
| 673|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 673|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 674| 674| 						}
| 675| 675| 						else
| 676| 676| 						{
|    | [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
| 671| 671| 							placementSupport.wallEndPosition = undefined;
| 672| 672| 
| 673| 673| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 674|    |-						}
|    | 674|+					}
| 675| 675| 						else
| 676| 676| 						{
| 677| 677| 							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
| 672| 672| 
| 673| 673| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 674| 674| 						}
| 675|    |-						else
|    | 675|+					else
| 676| 676| 						{
| 677| 677| 							placementSupport.Reset();
| 678| 678| 							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
| 673| 673| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 674| 674| 						}
| 675| 675| 						else
| 676|    |-						{
|    | 676|+					{
| 677| 677| 							placementSupport.Reset();
| 678| 678| 							inputState = INPUT_NORMAL;
| 679| 679| 						}
|    | [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
| 674| 674| 						}
| 675| 675| 						else
| 676| 676| 						{
| 677|    |-							placementSupport.Reset();
|    | 677|+						placementSupport.Reset();
| 678| 678| 							inputState = INPUT_NORMAL;
| 679| 679| 						}
| 680| 680| 					}
|    | [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
| 675| 675| 						else
| 676| 676| 						{
| 677| 677| 							placementSupport.Reset();
| 678|    |-							inputState = INPUT_NORMAL;
|    | 678|+						inputState = INPUT_NORMAL;
| 679| 679| 						}
| 680| 680| 					}
| 681| 681| 					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
| 676| 676| 						{
| 677| 677| 							placementSupport.Reset();
| 678| 678| 							inputState = INPUT_NORMAL;
| 679|    |-						}
|    | 679|+					}
| 680| 680| 					}
| 681| 681| 					else
| 682| 682| 						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
| 677| 677| 							placementSupport.Reset();
| 678| 678| 							inputState = INPUT_NORMAL;
| 679| 679| 						}
| 680|    |-					}
|    | 680|+				}
| 681| 681| 					else
| 682| 682| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 683| 683| 
|    | [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
| 678| 678| 							inputState = INPUT_NORMAL;
| 679| 679| 						}
| 680| 680| 					}
| 681|    |-					else
|    | 681|+				else
| 682| 682| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 683| 683| 
| 684| 684| 					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
| 679| 679| 						}
| 680| 680| 					}
| 681| 681| 					else
| 682|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 682|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 683| 683| 
| 684| 684| 					updateBuildingPlacementPreview();
| 685| 685| 					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
| 681| 681| 					else
| 682| 682| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 683| 683| 
| 684|    |-					updateBuildingPlacementPreview();
|    | 684|+				updateBuildingPlacementPreview();
| 685| 685| 					return true;
| 686| 686| 				}
| 687| 687| 				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
| 682| 682| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 683| 683| 
| 684| 684| 					updateBuildingPlacementPreview();
| 685|    |-					return true;
|    | 685|+				return true;
| 686| 686| 				}
| 687| 687| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 688| 688| 				{
|    | [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
| 683| 683| 
| 684| 684| 					updateBuildingPlacementPreview();
| 685| 685| 					return true;
| 686|    |-				}
|    | 686|+			}
| 687| 687| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 688| 688| 				{
| 689| 689| 					// reset to normal input mode
|    | [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
| 684| 684| 					updateBuildingPlacementPreview();
| 685| 685| 					return true;
| 686| 686| 				}
| 687|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 687|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 688| 688| 				{
| 689| 689| 					// reset to normal input mode
| 690| 690| 					placementSupport.Reset();
|    | [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
| 685| 685| 					return true;
| 686| 686| 				}
| 687| 687| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 688|    |-				{
|    | 688|+			{
| 689| 689| 					// reset to normal input mode
| 690| 690| 					placementSupport.Reset();
| 691| 691| 					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
| 686| 686| 				}
| 687| 687| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 688| 688| 				{
| 689|    |-					// reset to normal input mode
|    | 689|+				// reset to normal input mode
| 690| 690| 					placementSupport.Reset();
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 
|    | [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
| 687| 687| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 688| 688| 				{
| 689| 689| 					// reset to normal input mode
| 690|    |-					placementSupport.Reset();
|    | 690|+				placementSupport.Reset();
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 
| 693| 693| 					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
| 688| 688| 				{
| 689| 689| 					// reset to normal input mode
| 690| 690| 					placementSupport.Reset();
| 691|    |-					updateBuildingPlacementPreview();
|    | 691|+				updateBuildingPlacementPreview();
| 692| 692| 
| 693| 693| 					inputState = INPUT_NORMAL;
| 694| 694| 					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
| 690| 690| 					placementSupport.Reset();
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 
| 693|    |-					inputState = INPUT_NORMAL;
|    | 693|+				inputState = INPUT_NORMAL;
| 694| 694| 					return true;
| 695| 695| 				}
| 696| 696| 				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
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 
| 693| 693| 					inputState = INPUT_NORMAL;
| 694|    |-					return true;
|    | 694|+				return true;
| 695| 695| 				}
| 696| 696| 				break;
| 697| 697| 		}
|    | [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
| 692| 692| 
| 693| 693| 					inputState = INPUT_NORMAL;
| 694| 694| 					return true;
| 695|    |-				}
|    | 695|+			}
| 696| 696| 				break;
| 697| 697| 		}
| 698| 698| 		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
| 693| 693| 					inputState = INPUT_NORMAL;
| 694| 694| 					return true;
| 695| 695| 				}
| 696|    |-				break;
|    | 696|+			break;
| 697| 697| 		}
| 698| 698| 		break;
| 699| 699| 
|    | [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
| 703| 703| 		case "mousemotion":
| 704| 704| 			let maxDragDelta = 16;
| 705| 705| 			if (g_DragStart.distanceTo(ev) >= maxDragDelta)
| 706|    |-			{
|    | 706|+			
| 707| 707| 				// Rotate in the direction of the mouse
| 708| 708| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 709|    |-			}
|    | 709|+			
| 710| 710| 			else
| 711| 711| 			{
| 712| 712| 				// 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
| 708| 708| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 709| 709| 			}
| 710| 710| 			else
| 711|    |-			{
|    | 711|+			
| 712| 712| 				// If the mouse is near the center, snap back to the default orientation
| 713| 713| 				placementSupport.SetDefaultAngle();
| 714|    |-			}
|    | 714|+			
| 715| 715| 
| 716| 716| 			var snapData = Engine.GuiInterfaceCall("GetFoundationSnapData", {
| 717| 717| 				"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
| 734| 734| 				// If shift is down, let the player continue placing another of the same building
| 735| 735| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 736| 736| 				if (tryPlaceBuilding(queued))
| 737|    |-				{
|    | 737|+				
| 738| 738| 					if (queued)
| 739| 739| 						inputState = INPUT_BUILDING_PLACEMENT;
| 740| 740| 					else
| 741| 741| 						inputState = INPUT_NORMAL;
| 742|    |-				}
|    | 742|+				
| 743| 743| 				else
| 744| 744| 				{
| 745| 745| 					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
| 741| 741| 						inputState = INPUT_NORMAL;
| 742| 742| 				}
| 743| 743| 				else
| 744|    |-				{
|    | 744|+				
| 745| 745| 					inputState = INPUT_BUILDING_PLACEMENT;
| 746|    |-				}
|    | 746|+				
| 747| 747| 				return true;
| 748| 748| 			}
| 749| 749| 			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
| 790| 790| 
| 791| 791| 	// Handle the time-warp testing features, restricted to single-player
| 792| 792| 	if (!g_IsNetworked && Engine.GetGUIObjectByName("devTimeWarp").checked)
| 793|    |-	{
|    | 793|+	
| 794| 794| 		if (ev.type == "hotkeydown" && ev.hotkey == "session.timewarp.fastforward")
| 795| 795| 			Engine.SetSimRate(20.0);
| 796| 796| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.fastforward")
| 797| 797| 			Engine.SetSimRate(1.0);
| 798| 798| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.rewind")
| 799| 799| 			Engine.RewindTimeWarp();
| 800|    |-	}
|    | 800|+	
| 801| 801| 
| 802| 802| 	if (ev.hotkey == "session.highlightguarding")
| 803| 803| 	{
|    | [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
| 849| 849| 			break;
| 850| 850| 
| 851| 851| 		case "hotkeydown":
| 852|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 852|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 853| 853| 				{
| 854| 854| 					let now = Date.now();
| 855| 855| 					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
| 850| 850| 
| 851| 851| 		case "hotkeydown":
| 852| 852| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 853|    |-				{
|    | 853|+			{
| 854| 854| 					let now = Date.now();
| 855| 855| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 856| 856| 					{
|    | [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
| 851| 851| 		case "hotkeydown":
| 852| 852| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 853| 853| 				{
| 854|    |-					let now = Date.now();
|    | 854|+				let now = Date.now();
| 855| 855| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 856| 856| 					{
| 857| 857| 						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
| 852| 852| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 853| 853| 				{
| 854| 854| 					let now = Date.now();
| 855|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 855|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 856| 856| 					{
| 857| 857| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 858| 858| 						{
|    | [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
| 853| 853| 				{
| 854| 854| 					let now = Date.now();
| 855| 855| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 856|    |-					{
|    | 856|+				{
| 857| 857| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 858| 858| 						{
| 859| 859| 							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
| 854| 854| 					let now = Date.now();
| 855| 855| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 856| 856| 					{
| 857|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 857|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 858| 858| 						{
| 859| 859| 							var sptr = ev.hotkey.split(".");
| 860| 860| 							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
| 855| 855| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 856| 856| 					{
| 857| 857| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 858|    |-						{
|    | 858|+					{
| 859| 859| 							var sptr = ev.hotkey.split(".");
| 860| 860| 							performGroup("snap", sptr[3]);
| 861| 861| 						}
|    | [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
| 856| 856| 					{
| 857| 857| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 858| 858| 						{
| 859|    |-							var sptr = ev.hotkey.split(".");
|    | 859|+						var sptr = ev.hotkey.split(".");
| 860| 860| 							performGroup("snap", sptr[3]);
| 861| 861| 						}
| 862| 862| 					}
|    | [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
| 857| 857| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 858| 858| 						{
| 859| 859| 							var sptr = ev.hotkey.split(".");
| 860|    |-							performGroup("snap", sptr[3]);
|    | 860|+						performGroup("snap", sptr[3]);
| 861| 861| 						}
| 862| 862| 					}
| 863| 863| 					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
| 858| 858| 						{
| 859| 859| 							var sptr = ev.hotkey.split(".");
| 860| 860| 							performGroup("snap", sptr[3]);
| 861|    |-						}
|    | 861|+					}
| 862| 862| 					}
| 863| 863| 					else
| 864| 864| 					{
|    | [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
| 859| 859| 							var sptr = ev.hotkey.split(".");
| 860| 860| 							performGroup("snap", sptr[3]);
| 861| 861| 						}
| 862|    |-					}
|    | 862|+				}
| 863| 863| 					else
| 864| 864| 					{
| 865| 865| 						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
| 860| 860| 							performGroup("snap", sptr[3]);
| 861| 861| 						}
| 862| 862| 					}
| 863|    |-					else
|    | 863|+				else
| 864| 864| 					{
| 865| 865| 						var sptr = ev.hotkey.split(".");
| 866| 866| 						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
| 861| 861| 						}
| 862| 862| 					}
| 863| 863| 					else
| 864|    |-					{
|    | 864|+				{
| 865| 865| 						var sptr = ev.hotkey.split(".");
| 866| 866| 						performGroup(sptr[2], sptr[3]);
| 867| 867| 
|    | [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
| 862| 862| 					}
| 863| 863| 					else
| 864| 864| 					{
| 865|    |-						var sptr = ev.hotkey.split(".");
|    | 865|+					var sptr = ev.hotkey.split(".");
| 866| 866| 						performGroup(sptr[2], sptr[3]);
| 867| 867| 
| 868| 868| 						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
| 863| 863| 					else
| 864| 864| 					{
| 865| 865| 						var sptr = ev.hotkey.split(".");
| 866|    |-						performGroup(sptr[2], sptr[3]);
|    | 866|+					performGroup(sptr[2], sptr[3]);
| 867| 867| 
| 868| 868| 						doublePressTimer = now;
| 869| 869| 						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
| 865| 865| 						var sptr = ev.hotkey.split(".");
| 866| 866| 						performGroup(sptr[2], sptr[3]);
| 867| 867| 
| 868|    |-						doublePressTimer = now;
|    | 868|+					doublePressTimer = now;
| 869| 869| 						prevHotkey = ev.hotkey;
| 870| 870| 					}
| 871| 871| 				}
|    | [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
| 866| 866| 						performGroup(sptr[2], sptr[3]);
| 867| 867| 
| 868| 868| 						doublePressTimer = now;
| 869|    |-						prevHotkey = ev.hotkey;
|    | 869|+					prevHotkey = ev.hotkey;
| 870| 870| 					}
| 871| 871| 				}
| 872| 872| 				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
| 867| 867| 
| 868| 868| 						doublePressTimer = now;
| 869| 869| 						prevHotkey = ev.hotkey;
| 870|    |-					}
|    | 870|+				}
| 871| 871| 				}
| 872| 872| 				break;
| 873| 873| 		}
|    | [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
| 868| 868| 						doublePressTimer = now;
| 869| 869| 						prevHotkey = ev.hotkey;
| 870| 870| 					}
| 871|    |-				}
|    | 871|+			}
| 872| 872| 				break;
| 873| 873| 		}
| 874| 874| 		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
| 869| 869| 						prevHotkey = ev.hotkey;
| 870| 870| 					}
| 871| 871| 				}
| 872|    |-				break;
|    | 872|+			break;
| 873| 873| 		}
| 874| 874| 		break;
| 875| 875| 
|    | [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
|1037|1037| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1038|1038| 
|1039|1039| 			if (placementSupport.mode === "wall")
|1040|    |-			{
|    |1040|+			
|1041|1041| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1042|1042| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1043|1043| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1044|1044| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1045|    |-			}
|    |1045|+			
|1046|1046| 			else
|1047|1047| 			{
|1048|1048| 				// cancel if not enough resources
|    | [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
|1302|1302| 	if (templateData.attack &&
|1303|1303| 		templateData.attack.Ranged &&
|1304|1304| 		templateData.attack.Ranged.maxRange)
|1305|    |-	{
|    |1305|+	
|1306|1306| 		// add attack information to display a good tooltip
|1307|1307| 		placementSupport.attack = templateData.attack;
|1308|    |-	}
|    |1308|+	
|1309|1309| }
|1310|1310| 
|1311|1311| // 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
|1369|1369| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1370|1370| 	{
|1371|1371| 		if (inputState == INPUT_BATCHTRAINING)
|1372|    |-		{
|    |1372|+		
|1373|1373| 			// Check if we are training in the same building(s) as the last batch
|1374|1374| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1375|1375| 			// If the order changed, we have a new selection and we should create a new batch.
|1402|1402| 			else if (!decrement)
|1403|1403| 				flushTrainingBatch();
|1404|1404| 				// fall through to create the new batch
|1405|    |-		}
|    |1405|+		
|1406|1406| 
|1407|1407| 		// Don't start a new batch if decrementing or unable to afford it.
|1408|1408| 		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
|1401|1401| 			// Otherwise start a new one
|1402|1402| 			else if (!decrement)
|1403|1403| 				flushTrainingBatch();
|1404|    |-				// fall through to create the new batch
|    |1404|+			// fall through to create the new batch
|1405|1405| 		}
|1406|1406| 
|1407|1407| 		// 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
|1480|1480| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1481|1481| 	{
|1482|1482| 		// Train as many full batches as we can
|1483|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1483|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1484|1484| 		Engine.PostNetworkCommand({
|1485|1485| 			"type": "train",
|1486|1486| 			"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
|1559|1559| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1560|1560| 
|1561|1561| 	// Reset the last idle unit, etc., if the selection type has changed.
|1562|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1562|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1563|1563| 		resetIdleUnit();
|1564|1564| 	lastIdleClasses = classes;
|1565|1565| 

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

binaries/data/mods/public/gui/session/input.js
| 228| »   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
| 242| »   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
| 459| »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
|1024| »   »   »   »   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
|1033| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 474| »   »   &&·(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
| 504| »   »   »   »   var·rect·=·updateBandbox(bandbox,·ev,·true);
|    | [NORMAL] JSHintBear:
|    | 'rect' is already defined.

binaries/data/mods/public/gui/session/input.js
| 507| »   »   »   »   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
| 664| »   »   »   »   »   var·queued·=·Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] JSHintBear:
|    | 'queued' is already defined.

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
|1174| »   if·(!ev.button·==·SDL_BUTTON_RIGHT)
|    | [NORMAL] JSHintBear:
|    | Confusing use of '!'.

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

bb accepted this revision.Feb 25 2018, 10:10 PM

Code reads ok apart from those few trivial changes, testing was ok.
AI doesn't need to use it so if it wants to at some point that could be done but for now no changes needed there.
No new iteration needed => accept (last changes will be done while commiting)

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

g_DragStart.distanceTo(ev) >= g_MaxDragDelta vs g_DragStart.distanceToSquared(ev) >= g_MaxDragDelta * g_MaxDragDelta don't see the readability drain
Where did elexis disagree?

1162–1163

target.distanceToSquared(g_FreehandSelection_InputLine[g_FreehandSelection_InputLine.length - 1])

1164

could store the square as it is only used here

1214–1216

good line spacing, but would like 4 spaces in front, so we have the different terms nicely alligned

1224

no targetclasses defined, throws warning when testing attack-walk,
needs to add "targetClasses": Engine.HotkeyIsPressed("session.attackmoveUnit") ? { "attack": ["Unit"] } : { "attack": ["Unit", "Structure"] },

This revision is now accepted and ready to land.Feb 25 2018, 10:10 PM

Posting my last inline comments for the previous iteration of the patch of the unfinished review.

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

The state should not be named according to the virtual key pressed, but to the consequential action.

So INPUT_UNIT_POSITION_START and INPUT_UNIT_POSITIONING maybe

45

The ingame positions the units will take up or just GUI screenspace coordinates that don't relate to the units yet?

49

The JSdoc comment missing here could state that this is a minimum distance between units.

50

these two should have a comment

1009

Not cool in the long-term that this is hardcoded to the right-button.
I have a trac ticket for that somewhere, all of that should become hotkeys.
But ok for now as it's consistent with the rest and it will be easy to change as stuff had been moved to functions.

1165

Ok not to use distanceTo or distanceToSquared as it's executed per mousemove.

This revision was automatically updated to reflect the committed changes.
Owners added a subscriber: Restricted Owners Package.Feb 25 2018, 11:17 PM

Thanks for the feature Optimus! It's one of the highlights of this release.

I know it's been a long way that took a lot of patience, thx for reviewing and commiting