Page MenuHomeWildfire Games

Handle hotkey to order only one unit on minimap
ClosedPublic

Authored by luiko on Apr 9 2019, 9:05 PM.

Details

Reviewers
bb
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Owners Package(Owns No Changed Paths)
Commits
rP22187: Handle orderone hotkey also for the minimap
Summary

Some hotkeys that modify mouse action are available on the minimap like move, attack move and queue order but not order-one.
Adding order-one hotkey on the minimap is useful in combination with these to explore fast and end the game faster with sneaky enemies(bots), among other.

Test Plan

Select a group of units then alt + rightclick to move on the map
repeat now on the minimap

Diff Detail

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

Event Timeline

luiko created this revision.Apr 9 2019, 9:05 PM
Vulcan added a subscriber: Vulcan.Apr 9 2019, 9:06 PM

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

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

Stan added a reviewer: Restricted Owners Package.Apr 9 2019, 9:08 PM
Stan added a subscriber: Stan.
Stan added inline comments.
binaries/data/mods/public/gui/session/input.js
1263

Invert the condition and make this an early return.

1265

Can the code be turned into a function so that comment can be nuked ?

1268

Comment start with caps :)

luiko added inline comments.Apr 9 2019, 9:33 PM
binaries/data/mods/public/gui/session/input.js
1265

I thought about that, but I want to show this simpler, I would like do that too.

luiko marked an inline comment as not done.Apr 9 2019, 9:35 PM
luiko updated this revision to Diff 7712.Apr 10 2019, 12:49 AM

Invert the condition and make this an early return.

Do you mean like this?

luiko marked an inline comment as done.Apr 10 2019, 12:50 AM

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

Linter detected issues:
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
| 181| 181| 		}
| 182| 182| 	}
| 183| 183| 	else if (placementSupport.mode === "wall")
| 184|    |-	{
|    | 184|+	
| 185| 185| 		if (placementSupport.wallSet && placementSupport.position)
| 186| 186| 		{
| 187| 187| 			// Fetch an updated list of snapping candidate entities
| 199| 199| 				"snapEntities": placementSupport.wallSnapEntities,	// snapping entities (towers) for starting a wall segment
| 200| 200| 			});
| 201| 201| 		}
| 202|    |-	}
|    | 202|+	
| 203| 203| 
| 204| 204| 	return false;
| 205| 205| }
|    | [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
| 288| 288| 	}
| 289| 289| 
| 290| 290| 	if (!updateBuildingPlacementPreview())
| 291|    |-	{
|    | 291|+	
| 292| 292| 		// invalid location - don't build it
| 293| 293| 		// TODO: play a sound?
| 294| 294| 		return false;
| 295|    |-	}
|    | 295|+	
| 296| 296| 
| 297| 297| 	var selection = g_Selection.toList();
| 298| 298| 
|    | [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
| 327| 327| 	}
| 328| 328| 
| 329| 329| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 330|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 330|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 331| 331| 	{
| 332| 332| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 333| 333| 		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
| 354| 354| 	// (this is somewhat non-ideal and hardcode-ish)
| 355| 355| 	var hasWallSegment = false;
| 356| 356| 	for (let piece of cmd.pieces)
| 357|    |-	{
|    | 357|+	
| 358| 358| 		if (piece.template != cmd.wallSet.templates.tower) // TODO: hardcode-ish :(
| 359| 359| 		{
| 360| 360| 			hasWallSegment = true;
| 361| 361| 			break;
| 362| 362| 		}
| 363|    |-	}
|    | 363|+	
| 364| 364| 
| 365| 365| 	if (hasWallSegment)
| 366| 366| 	{
|    | [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
| 477| 477| 	mouseIsOverObject = (hoveredObject != null);
| 478| 478| 
| 479| 479| 	// Close the menu when interacting with the game world
| 480|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 481|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 480|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 481|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 482| 482| 		closeMenu();
| 483| 483| 
| 484| 484| 	// 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
| 518| 518| 
| 519| 519| 				// Update the list of selected units
| 520| 520| 				if (Engine.HotkeyIsPressed("selection.add"))
| 521|    |-				{
|    | 521|+				
| 522| 522| 					g_Selection.addList(ents);
| 523|    |-				}
|    | 523|+				
| 524| 524| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 525| 525| 				{
| 526| 526| 					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
| 522| 522| 					g_Selection.addList(ents);
| 523| 523| 				}
| 524| 524| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 525|    |-				{
|    | 525|+				
| 526| 526| 					g_Selection.removeList(ents);
| 527|    |-				}
|    | 527|+				
| 528| 528| 				else
| 529| 529| 				{
| 530| 530| 					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
| 578| 578| 				// If shift is down, let the player continue placing another of the same building
| 579| 579| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 580| 580| 				if (tryPlaceBuilding(queued))
| 581|    |-				{
|    | 581|+				
| 582| 582| 					if (queued)
| 583| 583| 						inputState = INPUT_BUILDING_PLACEMENT;
| 584| 584| 					else
| 585| 585| 						inputState = INPUT_NORMAL;
| 586|    |-				}
|    | 586|+				
| 587| 587| 				else
| 588| 588| 				{
| 589| 589| 					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
| 585| 585| 						inputState = INPUT_NORMAL;
| 586| 586| 				}
| 587| 587| 				else
| 588|    |-				{
|    | 588|+				
| 589| 589| 					inputState = INPUT_BUILDING_PLACEMENT;
| 590|    |-				}
|    | 590|+				
| 591| 591| 				return true;
| 592| 592| 			}
| 593| 593| 			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
| 638| 638| 		// user to continue building walls.
| 639| 639| 		switch (ev.type)
| 640| 640| 		{
| 641|    |-			case "mousemotion":
|    | 641|+		case "mousemotion":
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// 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
| 639| 639| 		switch (ev.type)
| 640| 640| 		{
| 641| 641| 			case "mousemotion":
| 642|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 642|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// 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
| 641| 641| 			case "mousemotion":
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644|    |-				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 644|+			// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// 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
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645|    |-				// the ending point and the starting point to snap to.
|    | 645|+			// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// 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
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646|    |-				//
|    | 646|+			//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// 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
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 647|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// 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
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 648|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// 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
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 649|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// 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
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 650|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
|    | [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| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 651|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
| 654| 654| 				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
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652|    |-				// points.
|    | 652|+			// points.
| 653| 653| 
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				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
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
| 654|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 654|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				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
| 652| 652| 				// points.
| 653| 653| 
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 655|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657|    |-				if (result && result.cost)
|    | 657|+			if (result && result.cost)
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					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
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658|    |-				{
|    | 658|+			{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						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
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
| 659|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 659|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						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
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660|    |-					placementSupport.tooltipMessage = [
|    | 660|+				placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].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
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661|    |-						getEntityCostTooltip(result),
|    | 661|+					getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
|    | [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
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662|    |-						getNeededResourcesTooltip(neededResources)
|    | 662|+					getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
|    | [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
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663|    |-					].filter(tip => tip).join("\n");
|    | 663|+				].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
| 666| 666| 				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
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664|    |-				}
|    | 664|+			}
| 665| 665| 
| 666| 666| 				break;
| 667| 667| 
|    | [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
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
| 666|    |-				break;
|    | 666|+			break;
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				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
| 665| 665| 
| 666| 666| 				break;
| 667| 667| 
| 668|    |-			case "mousebuttondown":
|    | 668|+		case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					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
| 666| 666| 				break;
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 669|+			if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					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
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670|    |-				{
|    | 670|+			{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
|    | [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
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 671|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						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
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672|    |-					if (tryPlaceWall(queued))
|    | 672|+				if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675| 675| 						{
|    | [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
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673|    |-					{
|    | 673|+					
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687|    |-					}
|    | 687|+					
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
|    | [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
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673|    |-					{
|    | 673|+				{
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// 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
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674|    |-						if (queued)
|    | 674|+					if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							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
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675|    |-						{
|    | 675|+					{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							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
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676|    |-							// continue building, just set a new starting position where we left off
|    | 676|+						// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 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| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 677|+						placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							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
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678|    |-							placementSupport.wallEndPosition = undefined;
|    | 678|+						placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
|    | [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
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 680|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682| 682| 						else
| 683| 683| 						{
|    | [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
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681|    |-						}
|    | 681|+					}
| 682| 682| 						else
| 683| 683| 						{
| 684| 684| 							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
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682|    |-						else
|    | 682|+					else
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							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
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682| 682| 						else
| 683|    |-						{
|    | 683|+					{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 681| 681| 						}
| 682| 682| 						else
| 683| 683| 						{
| 684|    |-							placementSupport.Reset();
|    | 684|+						placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 682| 682| 						else
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685|    |-							inputState = INPUT_NORMAL;
|    | 685|+						inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
| 688| 688| 					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
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686|    |-						}
|    | 686|+					}
| 687| 687| 					}
| 688| 688| 					else
| 689| 689| 						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
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687|    |-					}
|    | 687|+				}
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
|    | [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
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
| 688|    |-					else
|    | 688|+				else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					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
| 686| 686| 						}
| 687| 687| 					}
| 688| 688| 					else
| 689|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 689|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					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
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691|    |-					updateBuildingPlacementPreview();
|    | 691|+				updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693| 693| 				}
| 694| 694| 				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
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692|    |-					return true;
|    | 692|+				return true;
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
|    | [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
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693|    |-				}
|    | 693|+			}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// 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
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693| 693| 				}
| 694|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 694|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					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
| 692| 692| 					return true;
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695|    |-				{
|    | 695|+			{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					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
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696|    |-					// reset to normal input mode
|    | 696|+				// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697|    |-					placementSupport.Reset();
|    | 697|+				placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					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
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698|    |-					updateBuildingPlacementPreview();
|    | 698|+				updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					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
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700|    |-					inputState = INPUT_NORMAL;
|    | 700|+				inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702| 702| 				}
| 703| 703| 				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
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701|    |-					return true;
|    | 701|+				return true;
| 702| 702| 				}
| 703| 703| 				break;
| 704| 704| 		}
|    | [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
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702|    |-				}
|    | 702|+			}
| 703| 703| 				break;
| 704| 704| 		}
| 705| 705| 		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
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702| 702| 				}
| 703|    |-				break;
|    | 703|+			break;
| 704| 704| 		}
| 705| 705| 		break;
| 706| 706| 
|    | [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
| 710| 710| 		case "mousemotion":
| 711| 711| 			let maxDragDelta = 16;
| 712| 712| 			if (g_DragStart.distanceTo(ev) >= maxDragDelta)
| 713|    |-			{
|    | 713|+			
| 714| 714| 				// Rotate in the direction of the mouse
| 715| 715| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 716|    |-			}
|    | 716|+			
| 717| 717| 			else
| 718| 718| 			{
| 719| 719| 				// 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
| 715| 715| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 716| 716| 			}
| 717| 717| 			else
| 718|    |-			{
|    | 718|+			
| 719| 719| 				// If the mouse is near the center, snap back to the default orientation
| 720| 720| 				placementSupport.SetDefaultAngle();
| 721|    |-			}
|    | 721|+			
| 722| 722| 
| 723| 723| 			var snapData = Engine.GuiInterfaceCall("GetFoundationSnapData", {
| 724| 724| 				"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
| 741| 741| 				// If shift is down, let the player continue placing another of the same building
| 742| 742| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 743| 743| 				if (tryPlaceBuilding(queued))
| 744|    |-				{
|    | 744|+				
| 745| 745| 					if (queued)
| 746| 746| 						inputState = INPUT_BUILDING_PLACEMENT;
| 747| 747| 					else
| 748| 748| 						inputState = INPUT_NORMAL;
| 749|    |-				}
|    | 749|+				
| 750| 750| 				else
| 751| 751| 				{
| 752| 752| 					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
| 748| 748| 						inputState = INPUT_NORMAL;
| 749| 749| 				}
| 750| 750| 				else
| 751|    |-				{
|    | 751|+				
| 752| 752| 					inputState = INPUT_BUILDING_PLACEMENT;
| 753|    |-				}
|    | 753|+				
| 754| 754| 				return true;
| 755| 755| 			}
| 756| 756| 			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
| 797| 797| 
| 798| 798| 	// Handle the time-warp testing features, restricted to single-player
| 799| 799| 	if (!g_IsNetworked && Engine.GetGUIObjectByName("devTimeWarp").checked)
| 800|    |-	{
|    | 800|+	
| 801| 801| 		if (ev.type == "hotkeydown" && ev.hotkey == "session.timewarp.fastforward")
| 802| 802| 			Engine.SetSimRate(20.0);
| 803| 803| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.fastforward")
| 804| 804| 			Engine.SetSimRate(1.0);
| 805| 805| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.rewind")
| 806| 806| 			Engine.RewindTimeWarp();
| 807|    |-	}
|    | 807|+	
| 808| 808| 
| 809| 809| 	if (ev.hotkey == "session.highlightguarding")
| 810| 810| 	{
|    | [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
| 856| 856| 			break;
| 857| 857| 
| 858| 858| 		case "hotkeydown":
| 859|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 859|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861| 861| 					let now = Date.now();
| 862| 862| 					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
| 857| 857| 
| 858| 858| 		case "hotkeydown":
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860|    |-				{
|    | 860|+			{
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
|    | [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
| 858| 858| 		case "hotkeydown":
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861|    |-					let now = Date.now();
|    | 861|+				let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						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
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861| 861| 					let now = Date.now();
| 862|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 862|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
|    | [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| 				{
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863|    |-					{
|    | 863|+				{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							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
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 864|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							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
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865|    |-						{
|    | 865|+					{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
|    | [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
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866|    |-							var sptr = ev.hotkey.split(".");
|    | 866|+						var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
|    | [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
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867|    |-							performGroup("snap", sptr[3]);
|    | 867|+						performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
| 870| 870| 					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
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868|    |-						}
|    | 868|+					}
| 869| 869| 					}
| 870| 870| 					else
| 871| 871| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869|    |-					}
|    | 869|+				}
| 870| 870| 					else
| 871| 871| 					{
| 872| 872| 						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
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
| 870|    |-					else
|    | 870|+				else
| 871| 871| 					{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						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
| 868| 868| 						}
| 869| 869| 					}
| 870| 870| 					else
| 871|    |-					{
|    | 871|+				{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 869| 869| 					}
| 870| 870| 					else
| 871| 871| 					{
| 872|    |-						var sptr = ev.hotkey.split(".");
|    | 872|+					var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						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
| 870| 870| 					else
| 871| 871| 					{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873|    |-						performGroup(sptr[2], sptr[3]);
|    | 873|+					performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						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
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875|    |-						doublePressTimer = now;
|    | 875|+					doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876|    |-						prevHotkey = ev.hotkey;
|    | 876|+					prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
| 879| 879| 				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
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877|    |-					}
|    | 877|+				}
| 878| 878| 				}
| 879| 879| 				break;
| 880| 880| 		}
|    | [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
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878|    |-				}
|    | 878|+			}
| 879| 879| 				break;
| 880| 880| 		}
| 881| 881| 		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
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
| 879|    |-				break;
|    | 879|+			break;
| 880| 880| 		}
| 881| 881| 		break;
| 882| 882| 
|    | [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
|1044|1044| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1045|1045| 
|1046|1046| 			if (placementSupport.mode === "wall")
|1047|    |-			{
|    |1047|+			
|1048|1048| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1049|1049| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1050|1050| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1051|1051| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1052|    |-			}
|    |1052|+			
|1053|1053| 			else
|1054|1054| 			{
|1055|1055| 				// cancel if not enough resources
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1271|1271| 		// pick the first unit that can do this order.
|1272|1272| 		const unit = selection
|1273|1273| 			.find(entity => ["preSelectedActionCheck", "hotkeyActionCheck", "actionCheck"]
|1274|    |-				.some(method => 
|    |1274|+				.some(method =>
|1275|1275| 					g_UnitActions[action.type][method] &&
|1276|1276| 					g_UnitActions[action.type][method](action.target || undefined, [entity]))
|1277|1277| 		);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1274|1274| 				.some(method => 
|1275|1275| 					g_UnitActions[action.type][method] &&
|1276|1276| 					g_UnitActions[action.type][method](action.target || undefined, [entity]))
|1277|    |-		);
|    |1277|+			);
|1278|1278| 		if (unit) {
|1279|1279| 			selection = [unit];
|1280|1280| 			g_Selection.removeList(selection);
|    | [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
|1338|1338| 	if (templateData.attack &&
|1339|1339| 		templateData.attack.Ranged &&
|1340|1340| 		templateData.attack.Ranged.maxRange)
|1341|    |-	{
|    |1341|+	
|1342|1342| 		// add attack information to display a good tooltip
|1343|1343| 		placementSupport.attack = templateData.attack;
|1344|    |-	}
|    |1344|+	
|1345|1345| }
|1346|1346| 
|1347|1347| // 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
|1422|1422| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1423|1423| 	{
|1424|1424| 		if (inputState == INPUT_BATCHTRAINING)
|1425|    |-		{
|    |1425|+		
|1426|1426| 			// Check if we are training in the same building(s) as the last batch
|1427|1427| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1428|1428| 			// If the order changed, we have a new selection and we should create a new batch.
|1455|1455| 			else if (!decrement)
|1456|1456| 				flushTrainingBatch();
|1457|1457| 				// fall through to create the new batch
|1458|    |-		}
|    |1458|+		
|1459|1459| 
|1460|1460| 		// Don't start a new batch if decrementing or unable to afford it.
|1461|1461| 		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
|1454|1454| 			// Otherwise start a new one
|1455|1455| 			else if (!decrement)
|1456|1456| 				flushTrainingBatch();
|1457|    |-				// fall through to create the new batch
|    |1457|+			// fall through to create the new batch
|1458|1458| 		}
|1459|1459| 
|1460|1460| 		// 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
|1532|1532| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1533|1533| 	{
|1534|1534| 		// Train as many full batches as we can
|1535|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1535|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1536|1536| 		Engine.PostNetworkCommand({
|1537|1537| 			"type": "train",
|1538|1538| 			"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
|1611|1611| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1612|1612| 
|1613|1613| 	// Reset the last idle unit, etc., if the selection type has changed.
|1614|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1614|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1615|1615| 		resetIdleUnit();
|1616|1616| 	lastIdleClasses = classes;
|1617|1617| 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

luiko updated this revision to Diff 7714.Apr 10 2019, 2:41 AM

Create handleUnitsActions function to clean up repetetive code in doAction and handleMinimapEvent functions

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

Linter detected issues:
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
| 181| 181| 		}
| 182| 182| 	}
| 183| 183| 	else if (placementSupport.mode === "wall")
| 184|    |-	{
|    | 184|+	
| 185| 185| 		if (placementSupport.wallSet && placementSupport.position)
| 186| 186| 		{
| 187| 187| 			// Fetch an updated list of snapping candidate entities
| 199| 199| 				"snapEntities": placementSupport.wallSnapEntities,	// snapping entities (towers) for starting a wall segment
| 200| 200| 			});
| 201| 201| 		}
| 202|    |-	}
|    | 202|+	
| 203| 203| 
| 204| 204| 	return false;
| 205| 205| }
|    | [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
| 288| 288| 	}
| 289| 289| 
| 290| 290| 	if (!updateBuildingPlacementPreview())
| 291|    |-	{
|    | 291|+	
| 292| 292| 		// invalid location - don't build it
| 293| 293| 		// TODO: play a sound?
| 294| 294| 		return false;
| 295|    |-	}
|    | 295|+	
| 296| 296| 
| 297| 297| 	var selection = g_Selection.toList();
| 298| 298| 
|    | [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
| 327| 327| 	}
| 328| 328| 
| 329| 329| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 330|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 330|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 331| 331| 	{
| 332| 332| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 333| 333| 		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
| 354| 354| 	// (this is somewhat non-ideal and hardcode-ish)
| 355| 355| 	var hasWallSegment = false;
| 356| 356| 	for (let piece of cmd.pieces)
| 357|    |-	{
|    | 357|+	
| 358| 358| 		if (piece.template != cmd.wallSet.templates.tower) // TODO: hardcode-ish :(
| 359| 359| 		{
| 360| 360| 			hasWallSegment = true;
| 361| 361| 			break;
| 362| 362| 		}
| 363|    |-	}
|    | 363|+	
| 364| 364| 
| 365| 365| 	if (hasWallSegment)
| 366| 366| 	{
|    | [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
| 477| 477| 	mouseIsOverObject = (hoveredObject != null);
| 478| 478| 
| 479| 479| 	// Close the menu when interacting with the game world
| 480|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 481|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 480|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 481|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 482| 482| 		closeMenu();
| 483| 483| 
| 484| 484| 	// 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
| 518| 518| 
| 519| 519| 				// Update the list of selected units
| 520| 520| 				if (Engine.HotkeyIsPressed("selection.add"))
| 521|    |-				{
|    | 521|+				
| 522| 522| 					g_Selection.addList(ents);
| 523|    |-				}
|    | 523|+				
| 524| 524| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 525| 525| 				{
| 526| 526| 					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
| 522| 522| 					g_Selection.addList(ents);
| 523| 523| 				}
| 524| 524| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 525|    |-				{
|    | 525|+				
| 526| 526| 					g_Selection.removeList(ents);
| 527|    |-				}
|    | 527|+				
| 528| 528| 				else
| 529| 529| 				{
| 530| 530| 					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
| 578| 578| 				// If shift is down, let the player continue placing another of the same building
| 579| 579| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 580| 580| 				if (tryPlaceBuilding(queued))
| 581|    |-				{
|    | 581|+				
| 582| 582| 					if (queued)
| 583| 583| 						inputState = INPUT_BUILDING_PLACEMENT;
| 584| 584| 					else
| 585| 585| 						inputState = INPUT_NORMAL;
| 586|    |-				}
|    | 586|+				
| 587| 587| 				else
| 588| 588| 				{
| 589| 589| 					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
| 585| 585| 						inputState = INPUT_NORMAL;
| 586| 586| 				}
| 587| 587| 				else
| 588|    |-				{
|    | 588|+				
| 589| 589| 					inputState = INPUT_BUILDING_PLACEMENT;
| 590|    |-				}
|    | 590|+				
| 591| 591| 				return true;
| 592| 592| 			}
| 593| 593| 			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
| 638| 638| 		// user to continue building walls.
| 639| 639| 		switch (ev.type)
| 640| 640| 		{
| 641|    |-			case "mousemotion":
|    | 641|+		case "mousemotion":
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// 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
| 639| 639| 		switch (ev.type)
| 640| 640| 		{
| 641| 641| 			case "mousemotion":
| 642|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 642|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// 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
| 641| 641| 			case "mousemotion":
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644|    |-				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 644|+			// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// 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
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645|    |-				// the ending point and the starting point to snap to.
|    | 645|+			// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// 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
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646|    |-				//
|    | 646|+			//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// 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
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 647|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// 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
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 648|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// 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
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 649|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// 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
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 650|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
|    | [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| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 651|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
| 654| 654| 				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
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652|    |-				// points.
|    | 652|+			// points.
| 653| 653| 
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				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
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
| 654|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 654|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				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
| 652| 652| 				// points.
| 653| 653| 
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 655|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657|    |-				if (result && result.cost)
|    | 657|+			if (result && result.cost)
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					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
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658|    |-				{
|    | 658|+			{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						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
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
| 659|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 659|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						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
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660|    |-					placementSupport.tooltipMessage = [
|    | 660|+				placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].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
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661|    |-						getEntityCostTooltip(result),
|    | 661|+					getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
|    | [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
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662|    |-						getNeededResourcesTooltip(neededResources)
|    | 662|+					getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
|    | [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
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663|    |-					].filter(tip => tip).join("\n");
|    | 663|+				].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
| 666| 666| 				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
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664|    |-				}
|    | 664|+			}
| 665| 665| 
| 666| 666| 				break;
| 667| 667| 
|    | [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
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
| 666|    |-				break;
|    | 666|+			break;
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				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
| 665| 665| 
| 666| 666| 				break;
| 667| 667| 
| 668|    |-			case "mousebuttondown":
|    | 668|+		case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					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
| 666| 666| 				break;
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 669|+			if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					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
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670|    |-				{
|    | 670|+			{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
|    | [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
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 671|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						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
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672|    |-					if (tryPlaceWall(queued))
|    | 672|+				if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675| 675| 						{
|    | [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
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673|    |-					{
|    | 673|+					
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687|    |-					}
|    | 687|+					
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
|    | [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
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673|    |-					{
|    | 673|+				{
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// 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
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674|    |-						if (queued)
|    | 674|+					if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							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
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675|    |-						{
|    | 675|+					{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							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
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676|    |-							// continue building, just set a new starting position where we left off
|    | 676|+						// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 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| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 677|+						placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							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
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678|    |-							placementSupport.wallEndPosition = undefined;
|    | 678|+						placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
|    | [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
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 680|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682| 682| 						else
| 683| 683| 						{
|    | [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
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681|    |-						}
|    | 681|+					}
| 682| 682| 						else
| 683| 683| 						{
| 684| 684| 							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
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682|    |-						else
|    | 682|+					else
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							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
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682| 682| 						else
| 683|    |-						{
|    | 683|+					{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 681| 681| 						}
| 682| 682| 						else
| 683| 683| 						{
| 684|    |-							placementSupport.Reset();
|    | 684|+						placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 682| 682| 						else
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685|    |-							inputState = INPUT_NORMAL;
|    | 685|+						inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
| 688| 688| 					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
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686|    |-						}
|    | 686|+					}
| 687| 687| 					}
| 688| 688| 					else
| 689| 689| 						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
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687|    |-					}
|    | 687|+				}
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
|    | [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
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
| 688|    |-					else
|    | 688|+				else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					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
| 686| 686| 						}
| 687| 687| 					}
| 688| 688| 					else
| 689|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 689|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					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
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691|    |-					updateBuildingPlacementPreview();
|    | 691|+				updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693| 693| 				}
| 694| 694| 				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
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692|    |-					return true;
|    | 692|+				return true;
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
|    | [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
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693|    |-				}
|    | 693|+			}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// 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
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693| 693| 				}
| 694|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 694|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					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
| 692| 692| 					return true;
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695|    |-				{
|    | 695|+			{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					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
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696|    |-					// reset to normal input mode
|    | 696|+				// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697|    |-					placementSupport.Reset();
|    | 697|+				placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					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
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698|    |-					updateBuildingPlacementPreview();
|    | 698|+				updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					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
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700|    |-					inputState = INPUT_NORMAL;
|    | 700|+				inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702| 702| 				}
| 703| 703| 				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
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701|    |-					return true;
|    | 701|+				return true;
| 702| 702| 				}
| 703| 703| 				break;
| 704| 704| 		}
|    | [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
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702|    |-				}
|    | 702|+			}
| 703| 703| 				break;
| 704| 704| 		}
| 705| 705| 		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
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702| 702| 				}
| 703|    |-				break;
|    | 703|+			break;
| 704| 704| 		}
| 705| 705| 		break;
| 706| 706| 
|    | [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
| 710| 710| 		case "mousemotion":
| 711| 711| 			let maxDragDelta = 16;
| 712| 712| 			if (g_DragStart.distanceTo(ev) >= maxDragDelta)
| 713|    |-			{
|    | 713|+			
| 714| 714| 				// Rotate in the direction of the mouse
| 715| 715| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 716|    |-			}
|    | 716|+			
| 717| 717| 			else
| 718| 718| 			{
| 719| 719| 				// 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
| 715| 715| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 716| 716| 			}
| 717| 717| 			else
| 718|    |-			{
|    | 718|+			
| 719| 719| 				// If the mouse is near the center, snap back to the default orientation
| 720| 720| 				placementSupport.SetDefaultAngle();
| 721|    |-			}
|    | 721|+			
| 722| 722| 
| 723| 723| 			var snapData = Engine.GuiInterfaceCall("GetFoundationSnapData", {
| 724| 724| 				"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
| 741| 741| 				// If shift is down, let the player continue placing another of the same building
| 742| 742| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 743| 743| 				if (tryPlaceBuilding(queued))
| 744|    |-				{
|    | 744|+				
| 745| 745| 					if (queued)
| 746| 746| 						inputState = INPUT_BUILDING_PLACEMENT;
| 747| 747| 					else
| 748| 748| 						inputState = INPUT_NORMAL;
| 749|    |-				}
|    | 749|+				
| 750| 750| 				else
| 751| 751| 				{
| 752| 752| 					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
| 748| 748| 						inputState = INPUT_NORMAL;
| 749| 749| 				}
| 750| 750| 				else
| 751|    |-				{
|    | 751|+				
| 752| 752| 					inputState = INPUT_BUILDING_PLACEMENT;
| 753|    |-				}
|    | 753|+				
| 754| 754| 				return true;
| 755| 755| 			}
| 756| 756| 			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
| 797| 797| 
| 798| 798| 	// Handle the time-warp testing features, restricted to single-player
| 799| 799| 	if (!g_IsNetworked && Engine.GetGUIObjectByName("devTimeWarp").checked)
| 800|    |-	{
|    | 800|+	
| 801| 801| 		if (ev.type == "hotkeydown" && ev.hotkey == "session.timewarp.fastforward")
| 802| 802| 			Engine.SetSimRate(20.0);
| 803| 803| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.fastforward")
| 804| 804| 			Engine.SetSimRate(1.0);
| 805| 805| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.rewind")
| 806| 806| 			Engine.RewindTimeWarp();
| 807|    |-	}
|    | 807|+	
| 808| 808| 
| 809| 809| 	if (ev.hotkey == "session.highlightguarding")
| 810| 810| 	{
|    | [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
| 856| 856| 			break;
| 857| 857| 
| 858| 858| 		case "hotkeydown":
| 859|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 859|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861| 861| 					let now = Date.now();
| 862| 862| 					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
| 857| 857| 
| 858| 858| 		case "hotkeydown":
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860|    |-				{
|    | 860|+			{
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
|    | [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
| 858| 858| 		case "hotkeydown":
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861|    |-					let now = Date.now();
|    | 861|+				let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						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
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861| 861| 					let now = Date.now();
| 862|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 862|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
|    | [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| 				{
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863|    |-					{
|    | 863|+				{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							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
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 864|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							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
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865|    |-						{
|    | 865|+					{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
|    | [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
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866|    |-							var sptr = ev.hotkey.split(".");
|    | 866|+						var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
|    | [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
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867|    |-							performGroup("snap", sptr[3]);
|    | 867|+						performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
| 870| 870| 					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
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868|    |-						}
|    | 868|+					}
| 869| 869| 					}
| 870| 870| 					else
| 871| 871| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869|    |-					}
|    | 869|+				}
| 870| 870| 					else
| 871| 871| 					{
| 872| 872| 						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
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
| 870|    |-					else
|    | 870|+				else
| 871| 871| 					{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						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
| 868| 868| 						}
| 869| 869| 					}
| 870| 870| 					else
| 871|    |-					{
|    | 871|+				{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 869| 869| 					}
| 870| 870| 					else
| 871| 871| 					{
| 872|    |-						var sptr = ev.hotkey.split(".");
|    | 872|+					var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						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
| 870| 870| 					else
| 871| 871| 					{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873|    |-						performGroup(sptr[2], sptr[3]);
|    | 873|+					performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						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
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875|    |-						doublePressTimer = now;
|    | 875|+					doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876|    |-						prevHotkey = ev.hotkey;
|    | 876|+					prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
| 879| 879| 				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
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877|    |-					}
|    | 877|+				}
| 878| 878| 				}
| 879| 879| 				break;
| 880| 880| 		}
|    | [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
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878|    |-				}
|    | 878|+			}
| 879| 879| 				break;
| 880| 880| 		}
| 881| 881| 		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
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
| 879|    |-				break;
|    | 879|+			break;
| 880| 880| 		}
| 881| 881| 		break;
| 882| 882| 
|    | [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
|1044|1044| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1045|1045| 
|1046|1046| 			if (placementSupport.mode === "wall")
|1047|    |-			{
|    |1047|+			
|1048|1048| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1049|1049| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1050|1050| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1051|1051| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1052|    |-			}
|    |1052|+			
|1053|1053| 			else
|1054|1054| 			{
|1055|1055| 				// 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
|1320|1320| 	if (templateData.attack &&
|1321|1321| 		templateData.attack.Ranged &&
|1322|1322| 		templateData.attack.Ranged.maxRange)
|1323|    |-	{
|    |1323|+	
|1324|1324| 		// add attack information to display a good tooltip
|1325|1325| 		placementSupport.attack = templateData.attack;
|1326|    |-	}
|    |1326|+	
|1327|1327| }
|1328|1328| 
|1329|1329| // 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
|1404|1404| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1405|1405| 	{
|1406|1406| 		if (inputState == INPUT_BATCHTRAINING)
|1407|    |-		{
|    |1407|+		
|1408|1408| 			// Check if we are training in the same building(s) as the last batch
|1409|1409| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1410|1410| 			// If the order changed, we have a new selection and we should create a new batch.
|1437|1437| 			else if (!decrement)
|1438|1438| 				flushTrainingBatch();
|1439|1439| 				// fall through to create the new batch
|1440|    |-		}
|    |1440|+		
|1441|1441| 
|1442|1442| 		// Don't start a new batch if decrementing or unable to afford it.
|1443|1443| 		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
|1436|1436| 			// Otherwise start a new one
|1437|1437| 			else if (!decrement)
|1438|1438| 				flushTrainingBatch();
|1439|    |-				// fall through to create the new batch
|    |1439|+			// fall through to create the new batch
|1440|1440| 		}
|1441|1441| 
|1442|1442| 		// 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
|1514|1514| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1515|1515| 	{
|1516|1516| 		// Train as many full batches as we can
|1517|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1517|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1518|1518| 		Engine.PostNetworkCommand({
|1519|1519| 			"type": "train",
|1520|1520| 			"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
|1593|1593| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1594|1594| 
|1595|1595| 	// Reset the last idle unit, etc., if the selection type has changed.
|1596|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1596|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1597|1597| 		resetIdleUnit();
|1598|1598| 	lastIdleClasses = classes;
|1599|1599| 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

luiko marked 2 inline comments as done.Apr 10 2019, 2:44 AM
luiko added a reviewer: Restricted Owners Package.Apr 10 2019, 10:33 PM
Stan added a comment.Apr 10 2019, 10:47 PM

When creating your patch please add context using git diff -U5000 or svn diff -x -U5000, so that we can see the lines above and below :)

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

can be inlined :)

luiko updated this revision to Diff 7720.Apr 11 2019, 2:25 AM

add context

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

Linter detected issues:
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
| 181| 181| 		}
| 182| 182| 	}
| 183| 183| 	else if (placementSupport.mode === "wall")
| 184|    |-	{
|    | 184|+	
| 185| 185| 		if (placementSupport.wallSet && placementSupport.position)
| 186| 186| 		{
| 187| 187| 			// Fetch an updated list of snapping candidate entities
| 199| 199| 				"snapEntities": placementSupport.wallSnapEntities,	// snapping entities (towers) for starting a wall segment
| 200| 200| 			});
| 201| 201| 		}
| 202|    |-	}
|    | 202|+	
| 203| 203| 
| 204| 204| 	return false;
| 205| 205| }
|    | [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
| 288| 288| 	}
| 289| 289| 
| 290| 290| 	if (!updateBuildingPlacementPreview())
| 291|    |-	{
|    | 291|+	
| 292| 292| 		// invalid location - don't build it
| 293| 293| 		// TODO: play a sound?
| 294| 294| 		return false;
| 295|    |-	}
|    | 295|+	
| 296| 296| 
| 297| 297| 	var selection = g_Selection.toList();
| 298| 298| 
|    | [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
| 327| 327| 	}
| 328| 328| 
| 329| 329| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 330|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 330|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 331| 331| 	{
| 332| 332| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 333| 333| 		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
| 354| 354| 	// (this is somewhat non-ideal and hardcode-ish)
| 355| 355| 	var hasWallSegment = false;
| 356| 356| 	for (let piece of cmd.pieces)
| 357|    |-	{
|    | 357|+	
| 358| 358| 		if (piece.template != cmd.wallSet.templates.tower) // TODO: hardcode-ish :(
| 359| 359| 		{
| 360| 360| 			hasWallSegment = true;
| 361| 361| 			break;
| 362| 362| 		}
| 363|    |-	}
|    | 363|+	
| 364| 364| 
| 365| 365| 	if (hasWallSegment)
| 366| 366| 	{
|    | [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
| 477| 477| 	mouseIsOverObject = (hoveredObject != null);
| 478| 478| 
| 479| 479| 	// Close the menu when interacting with the game world
| 480|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 481|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 480|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 481|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 482| 482| 		closeMenu();
| 483| 483| 
| 484| 484| 	// 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
| 518| 518| 
| 519| 519| 				// Update the list of selected units
| 520| 520| 				if (Engine.HotkeyIsPressed("selection.add"))
| 521|    |-				{
|    | 521|+				
| 522| 522| 					g_Selection.addList(ents);
| 523|    |-				}
|    | 523|+				
| 524| 524| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 525| 525| 				{
| 526| 526| 					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
| 522| 522| 					g_Selection.addList(ents);
| 523| 523| 				}
| 524| 524| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 525|    |-				{
|    | 525|+				
| 526| 526| 					g_Selection.removeList(ents);
| 527|    |-				}
|    | 527|+				
| 528| 528| 				else
| 529| 529| 				{
| 530| 530| 					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
| 578| 578| 				// If shift is down, let the player continue placing another of the same building
| 579| 579| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 580| 580| 				if (tryPlaceBuilding(queued))
| 581|    |-				{
|    | 581|+				
| 582| 582| 					if (queued)
| 583| 583| 						inputState = INPUT_BUILDING_PLACEMENT;
| 584| 584| 					else
| 585| 585| 						inputState = INPUT_NORMAL;
| 586|    |-				}
|    | 586|+				
| 587| 587| 				else
| 588| 588| 				{
| 589| 589| 					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
| 585| 585| 						inputState = INPUT_NORMAL;
| 586| 586| 				}
| 587| 587| 				else
| 588|    |-				{
|    | 588|+				
| 589| 589| 					inputState = INPUT_BUILDING_PLACEMENT;
| 590|    |-				}
|    | 590|+				
| 591| 591| 				return true;
| 592| 592| 			}
| 593| 593| 			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
| 638| 638| 		// user to continue building walls.
| 639| 639| 		switch (ev.type)
| 640| 640| 		{
| 641|    |-			case "mousemotion":
|    | 641|+		case "mousemotion":
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// 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
| 639| 639| 		switch (ev.type)
| 640| 640| 		{
| 641| 641| 			case "mousemotion":
| 642|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 642|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// 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
| 641| 641| 			case "mousemotion":
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644|    |-				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 644|+			// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// 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
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645|    |-				// the ending point and the starting point to snap to.
|    | 645|+			// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// 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
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646|    |-				//
|    | 646|+			//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// 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
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 647|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// 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
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 648|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// 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
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 649|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// 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
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 650|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
|    | [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| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 651|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
| 654| 654| 				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
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652|    |-				// points.
|    | 652|+			// points.
| 653| 653| 
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				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
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
| 654|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 654|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				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
| 652| 652| 				// points.
| 653| 653| 
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 655|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657|    |-				if (result && result.cost)
|    | 657|+			if (result && result.cost)
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					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
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658|    |-				{
|    | 658|+			{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						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
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
| 659|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 659|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						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
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660|    |-					placementSupport.tooltipMessage = [
|    | 660|+				placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].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
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661|    |-						getEntityCostTooltip(result),
|    | 661|+					getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
|    | [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
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662|    |-						getNeededResourcesTooltip(neededResources)
|    | 662|+					getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
|    | [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
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663|    |-					].filter(tip => tip).join("\n");
|    | 663|+				].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
| 666| 666| 				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
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664|    |-				}
|    | 664|+			}
| 665| 665| 
| 666| 666| 				break;
| 667| 667| 
|    | [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
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
| 666|    |-				break;
|    | 666|+			break;
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				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
| 665| 665| 
| 666| 666| 				break;
| 667| 667| 
| 668|    |-			case "mousebuttondown":
|    | 668|+		case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					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
| 666| 666| 				break;
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 669|+			if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					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
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670|    |-				{
|    | 670|+			{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
|    | [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
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 671|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						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
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672|    |-					if (tryPlaceWall(queued))
|    | 672|+				if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675| 675| 						{
|    | [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
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673|    |-					{
|    | 673|+					
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687|    |-					}
|    | 687|+					
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
|    | [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
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673|    |-					{
|    | 673|+				{
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// 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
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674|    |-						if (queued)
|    | 674|+					if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							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
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675|    |-						{
|    | 675|+					{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							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
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676|    |-							// continue building, just set a new starting position where we left off
|    | 676|+						// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 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| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 677|+						placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							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
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678|    |-							placementSupport.wallEndPosition = undefined;
|    | 678|+						placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
|    | [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
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 680|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682| 682| 						else
| 683| 683| 						{
|    | [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
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681|    |-						}
|    | 681|+					}
| 682| 682| 						else
| 683| 683| 						{
| 684| 684| 							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
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682|    |-						else
|    | 682|+					else
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							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
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682| 682| 						else
| 683|    |-						{
|    | 683|+					{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 681| 681| 						}
| 682| 682| 						else
| 683| 683| 						{
| 684|    |-							placementSupport.Reset();
|    | 684|+						placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 682| 682| 						else
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685|    |-							inputState = INPUT_NORMAL;
|    | 685|+						inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
| 688| 688| 					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
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686|    |-						}
|    | 686|+					}
| 687| 687| 					}
| 688| 688| 					else
| 689| 689| 						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
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687|    |-					}
|    | 687|+				}
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
|    | [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
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
| 688|    |-					else
|    | 688|+				else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					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
| 686| 686| 						}
| 687| 687| 					}
| 688| 688| 					else
| 689|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 689|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					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
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691|    |-					updateBuildingPlacementPreview();
|    | 691|+				updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693| 693| 				}
| 694| 694| 				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
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692|    |-					return true;
|    | 692|+				return true;
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
|    | [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
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693|    |-				}
|    | 693|+			}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// 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
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693| 693| 				}
| 694|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 694|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					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
| 692| 692| 					return true;
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695|    |-				{
|    | 695|+			{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					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
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696|    |-					// reset to normal input mode
|    | 696|+				// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697|    |-					placementSupport.Reset();
|    | 697|+				placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					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
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698|    |-					updateBuildingPlacementPreview();
|    | 698|+				updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					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
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700|    |-					inputState = INPUT_NORMAL;
|    | 700|+				inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702| 702| 				}
| 703| 703| 				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
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701|    |-					return true;
|    | 701|+				return true;
| 702| 702| 				}
| 703| 703| 				break;
| 704| 704| 		}
|    | [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
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702|    |-				}
|    | 702|+			}
| 703| 703| 				break;
| 704| 704| 		}
| 705| 705| 		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
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702| 702| 				}
| 703|    |-				break;
|    | 703|+			break;
| 704| 704| 		}
| 705| 705| 		break;
| 706| 706| 
|    | [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
| 710| 710| 		case "mousemotion":
| 711| 711| 			let maxDragDelta = 16;
| 712| 712| 			if (g_DragStart.distanceTo(ev) >= maxDragDelta)
| 713|    |-			{
|    | 713|+			
| 714| 714| 				// Rotate in the direction of the mouse
| 715| 715| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 716|    |-			}
|    | 716|+			
| 717| 717| 			else
| 718| 718| 			{
| 719| 719| 				// 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
| 715| 715| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 716| 716| 			}
| 717| 717| 			else
| 718|    |-			{
|    | 718|+			
| 719| 719| 				// If the mouse is near the center, snap back to the default orientation
| 720| 720| 				placementSupport.SetDefaultAngle();
| 721|    |-			}
|    | 721|+			
| 722| 722| 
| 723| 723| 			var snapData = Engine.GuiInterfaceCall("GetFoundationSnapData", {
| 724| 724| 				"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
| 741| 741| 				// If shift is down, let the player continue placing another of the same building
| 742| 742| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 743| 743| 				if (tryPlaceBuilding(queued))
| 744|    |-				{
|    | 744|+				
| 745| 745| 					if (queued)
| 746| 746| 						inputState = INPUT_BUILDING_PLACEMENT;
| 747| 747| 					else
| 748| 748| 						inputState = INPUT_NORMAL;
| 749|    |-				}
|    | 749|+				
| 750| 750| 				else
| 751| 751| 				{
| 752| 752| 					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
| 748| 748| 						inputState = INPUT_NORMAL;
| 749| 749| 				}
| 750| 750| 				else
| 751|    |-				{
|    | 751|+				
| 752| 752| 					inputState = INPUT_BUILDING_PLACEMENT;
| 753|    |-				}
|    | 753|+				
| 754| 754| 				return true;
| 755| 755| 			}
| 756| 756| 			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
| 797| 797| 
| 798| 798| 	// Handle the time-warp testing features, restricted to single-player
| 799| 799| 	if (!g_IsNetworked && Engine.GetGUIObjectByName("devTimeWarp").checked)
| 800|    |-	{
|    | 800|+	
| 801| 801| 		if (ev.type == "hotkeydown" && ev.hotkey == "session.timewarp.fastforward")
| 802| 802| 			Engine.SetSimRate(20.0);
| 803| 803| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.fastforward")
| 804| 804| 			Engine.SetSimRate(1.0);
| 805| 805| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.rewind")
| 806| 806| 			Engine.RewindTimeWarp();
| 807|    |-	}
|    | 807|+	
| 808| 808| 
| 809| 809| 	if (ev.hotkey == "session.highlightguarding")
| 810| 810| 	{
|    | [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
| 856| 856| 			break;
| 857| 857| 
| 858| 858| 		case "hotkeydown":
| 859|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 859|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861| 861| 					let now = Date.now();
| 862| 862| 					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
| 857| 857| 
| 858| 858| 		case "hotkeydown":
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860|    |-				{
|    | 860|+			{
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
|    | [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
| 858| 858| 		case "hotkeydown":
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861|    |-					let now = Date.now();
|    | 861|+				let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						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
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861| 861| 					let now = Date.now();
| 862|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 862|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
|    | [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| 				{
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863|    |-					{
|    | 863|+				{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							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
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 864|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							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
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865|    |-						{
|    | 865|+					{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
|    | [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
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866|    |-							var sptr = ev.hotkey.split(".");
|    | 866|+						var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
|    | [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
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867|    |-							performGroup("snap", sptr[3]);
|    | 867|+						performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
| 870| 870| 					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
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868|    |-						}
|    | 868|+					}
| 869| 869| 					}
| 870| 870| 					else
| 871| 871| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869|    |-					}
|    | 869|+				}
| 870| 870| 					else
| 871| 871| 					{
| 872| 872| 						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
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
| 870|    |-					else
|    | 870|+				else
| 871| 871| 					{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						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
| 868| 868| 						}
| 869| 869| 					}
| 870| 870| 					else
| 871|    |-					{
|    | 871|+				{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 869| 869| 					}
| 870| 870| 					else
| 871| 871| 					{
| 872|    |-						var sptr = ev.hotkey.split(".");
|    | 872|+					var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						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
| 870| 870| 					else
| 871| 871| 					{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873|    |-						performGroup(sptr[2], sptr[3]);
|    | 873|+					performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						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
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875|    |-						doublePressTimer = now;
|    | 875|+					doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876|    |-						prevHotkey = ev.hotkey;
|    | 876|+					prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
| 879| 879| 				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
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877|    |-					}
|    | 877|+				}
| 878| 878| 				}
| 879| 879| 				break;
| 880| 880| 		}
|    | [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
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878|    |-				}
|    | 878|+			}
| 879| 879| 				break;
| 880| 880| 		}
| 881| 881| 		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
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
| 879|    |-				break;
|    | 879|+			break;
| 880| 880| 		}
| 881| 881| 		break;
| 882| 882| 
|    | [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
|1044|1044| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1045|1045| 
|1046|1046| 			if (placementSupport.mode === "wall")
|1047|    |-			{
|    |1047|+			
|1048|1048| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1049|1049| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1050|1050| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1051|1051| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1052|    |-			}
|    |1052|+			
|1053|1053| 			else
|1054|1054| 			{
|1055|1055| 				// 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
|1320|1320| 	if (templateData.attack &&
|1321|1321| 		templateData.attack.Ranged &&
|1322|1322| 		templateData.attack.Ranged.maxRange)
|1323|    |-	{
|    |1323|+	
|1324|1324| 		// add attack information to display a good tooltip
|1325|1325| 		placementSupport.attack = templateData.attack;
|1326|    |-	}
|    |1326|+	
|1327|1327| }
|1328|1328| 
|1329|1329| // 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
|1404|1404| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1405|1405| 	{
|1406|1406| 		if (inputState == INPUT_BATCHTRAINING)
|1407|    |-		{
|    |1407|+		
|1408|1408| 			// Check if we are training in the same building(s) as the last batch
|1409|1409| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1410|1410| 			// If the order changed, we have a new selection and we should create a new batch.
|1437|1437| 			else if (!decrement)
|1438|1438| 				flushTrainingBatch();
|1439|1439| 				// fall through to create the new batch
|1440|    |-		}
|    |1440|+		
|1441|1441| 
|1442|1442| 		// Don't start a new batch if decrementing or unable to afford it.
|1443|1443| 		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
|1436|1436| 			// Otherwise start a new one
|1437|1437| 			else if (!decrement)
|1438|1438| 				flushTrainingBatch();
|1439|    |-				// fall through to create the new batch
|    |1439|+			// fall through to create the new batch
|1440|1440| 		}
|1441|1441| 
|1442|1442| 		// 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
|1514|1514| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1515|1515| 	{
|1516|1516| 		// Train as many full batches as we can
|1517|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1517|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1518|1518| 		Engine.PostNetworkCommand({
|1519|1519| 			"type": "train",
|1520|1520| 			"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
|1593|1593| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1594|1594| 
|1595|1595| 	// Reset the last idle unit, etc., if the selection type has changed.
|1596|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1596|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1597|1597| 		resetIdleUnit();
|1598|1598| 	lastIdleClasses = classes;
|1599|1599| 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

luiko added inline comments.Apr 11 2019, 2:36 AM
binaries/data/mods/public/gui/session/input.js
1133

you mean like... ?

<  return handleUnitsActions(Engine.GetTerrainAtScreenPoint(ev.x, ev.y), action);
---
>  const target = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
>  return handleUnitsActions(target, action);
luiko marked an inline comment as not done.Apr 11 2019, 2:37 AM
Stan added inline comments.Apr 11 2019, 7:13 AM
binaries/data/mods/public/gui/session/input.js
1133

Yes :)

luiko updated this revision to Diff 7721.Apr 11 2019, 7:14 PM

mod inline return

luiko marked 2 inline comments as done.Apr 11 2019, 7:15 PM

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

Linter detected issues:
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
| 181| 181| 		}
| 182| 182| 	}
| 183| 183| 	else if (placementSupport.mode === "wall")
| 184|    |-	{
|    | 184|+	
| 185| 185| 		if (placementSupport.wallSet && placementSupport.position)
| 186| 186| 		{
| 187| 187| 			// Fetch an updated list of snapping candidate entities
| 199| 199| 				"snapEntities": placementSupport.wallSnapEntities,	// snapping entities (towers) for starting a wall segment
| 200| 200| 			});
| 201| 201| 		}
| 202|    |-	}
|    | 202|+	
| 203| 203| 
| 204| 204| 	return false;
| 205| 205| }
|    | [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
| 288| 288| 	}
| 289| 289| 
| 290| 290| 	if (!updateBuildingPlacementPreview())
| 291|    |-	{
|    | 291|+	
| 292| 292| 		// invalid location - don't build it
| 293| 293| 		// TODO: play a sound?
| 294| 294| 		return false;
| 295|    |-	}
|    | 295|+	
| 296| 296| 
| 297| 297| 	var selection = g_Selection.toList();
| 298| 298| 
|    | [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
| 327| 327| 	}
| 328| 328| 
| 329| 329| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 330|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 330|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 331| 331| 	{
| 332| 332| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 333| 333| 		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
| 354| 354| 	// (this is somewhat non-ideal and hardcode-ish)
| 355| 355| 	var hasWallSegment = false;
| 356| 356| 	for (let piece of cmd.pieces)
| 357|    |-	{
|    | 357|+	
| 358| 358| 		if (piece.template != cmd.wallSet.templates.tower) // TODO: hardcode-ish :(
| 359| 359| 		{
| 360| 360| 			hasWallSegment = true;
| 361| 361| 			break;
| 362| 362| 		}
| 363|    |-	}
|    | 363|+	
| 364| 364| 
| 365| 365| 	if (hasWallSegment)
| 366| 366| 	{
|    | [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
| 477| 477| 	mouseIsOverObject = (hoveredObject != null);
| 478| 478| 
| 479| 479| 	// Close the menu when interacting with the game world
| 480|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 481|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 480|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 481|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 482| 482| 		closeMenu();
| 483| 483| 
| 484| 484| 	// 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
| 518| 518| 
| 519| 519| 				// Update the list of selected units
| 520| 520| 				if (Engine.HotkeyIsPressed("selection.add"))
| 521|    |-				{
|    | 521|+				
| 522| 522| 					g_Selection.addList(ents);
| 523|    |-				}
|    | 523|+				
| 524| 524| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 525| 525| 				{
| 526| 526| 					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
| 522| 522| 					g_Selection.addList(ents);
| 523| 523| 				}
| 524| 524| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 525|    |-				{
|    | 525|+				
| 526| 526| 					g_Selection.removeList(ents);
| 527|    |-				}
|    | 527|+				
| 528| 528| 				else
| 529| 529| 				{
| 530| 530| 					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
| 578| 578| 				// If shift is down, let the player continue placing another of the same building
| 579| 579| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 580| 580| 				if (tryPlaceBuilding(queued))
| 581|    |-				{
|    | 581|+				
| 582| 582| 					if (queued)
| 583| 583| 						inputState = INPUT_BUILDING_PLACEMENT;
| 584| 584| 					else
| 585| 585| 						inputState = INPUT_NORMAL;
| 586|    |-				}
|    | 586|+				
| 587| 587| 				else
| 588| 588| 				{
| 589| 589| 					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
| 585| 585| 						inputState = INPUT_NORMAL;
| 586| 586| 				}
| 587| 587| 				else
| 588|    |-				{
|    | 588|+				
| 589| 589| 					inputState = INPUT_BUILDING_PLACEMENT;
| 590|    |-				}
|    | 590|+				
| 591| 591| 				return true;
| 592| 592| 			}
| 593| 593| 			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
| 638| 638| 		// user to continue building walls.
| 639| 639| 		switch (ev.type)
| 640| 640| 		{
| 641|    |-			case "mousemotion":
|    | 641|+		case "mousemotion":
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// 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
| 639| 639| 		switch (ev.type)
| 640| 640| 		{
| 641| 641| 			case "mousemotion":
| 642|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 642|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// 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
| 641| 641| 			case "mousemotion":
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644|    |-				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 644|+			// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// 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
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645|    |-				// the ending point and the starting point to snap to.
|    | 645|+			// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// 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
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646|    |-				//
|    | 646|+			//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// 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
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 647|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// 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
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 648|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// 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
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 649|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// 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
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 650|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
|    | [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| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 651|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
| 654| 654| 				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
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652|    |-				// points.
|    | 652|+			// points.
| 653| 653| 
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				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
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
| 654|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 654|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				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
| 652| 652| 				// points.
| 653| 653| 
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 655|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657|    |-				if (result && result.cost)
|    | 657|+			if (result && result.cost)
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					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
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658|    |-				{
|    | 658|+			{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						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
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
| 659|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 659|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						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
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660|    |-					placementSupport.tooltipMessage = [
|    | 660|+				placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].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
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661|    |-						getEntityCostTooltip(result),
|    | 661|+					getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
|    | [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
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662|    |-						getNeededResourcesTooltip(neededResources)
|    | 662|+					getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
|    | [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
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663|    |-					].filter(tip => tip).join("\n");
|    | 663|+				].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
| 666| 666| 				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
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664|    |-				}
|    | 664|+			}
| 665| 665| 
| 666| 666| 				break;
| 667| 667| 
|    | [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
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
| 666|    |-				break;
|    | 666|+			break;
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				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
| 665| 665| 
| 666| 666| 				break;
| 667| 667| 
| 668|    |-			case "mousebuttondown":
|    | 668|+		case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					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
| 666| 666| 				break;
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 669|+			if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					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
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670|    |-				{
|    | 670|+			{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
|    | [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
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 671|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						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
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672|    |-					if (tryPlaceWall(queued))
|    | 672|+				if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675| 675| 						{
|    | [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
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673|    |-					{
|    | 673|+					
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687|    |-					}
|    | 687|+					
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
|    | [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
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673|    |-					{
|    | 673|+				{
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// 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
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674|    |-						if (queued)
|    | 674|+					if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							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
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675|    |-						{
|    | 675|+					{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							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
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676|    |-							// continue building, just set a new starting position where we left off
|    | 676|+						// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 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| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 677|+						placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							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
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678|    |-							placementSupport.wallEndPosition = undefined;
|    | 678|+						placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
|    | [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
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 680|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682| 682| 						else
| 683| 683| 						{
|    | [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
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681|    |-						}
|    | 681|+					}
| 682| 682| 						else
| 683| 683| 						{
| 684| 684| 							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
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682|    |-						else
|    | 682|+					else
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							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
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682| 682| 						else
| 683|    |-						{
|    | 683|+					{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 681| 681| 						}
| 682| 682| 						else
| 683| 683| 						{
| 684|    |-							placementSupport.Reset();
|    | 684|+						placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 682| 682| 						else
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685|    |-							inputState = INPUT_NORMAL;
|    | 685|+						inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
| 688| 688| 					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
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686|    |-						}
|    | 686|+					}
| 687| 687| 					}
| 688| 688| 					else
| 689| 689| 						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
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687|    |-					}
|    | 687|+				}
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
|    | [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
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
| 688|    |-					else
|    | 688|+				else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					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
| 686| 686| 						}
| 687| 687| 					}
| 688| 688| 					else
| 689|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 689|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					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
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691|    |-					updateBuildingPlacementPreview();
|    | 691|+				updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693| 693| 				}
| 694| 694| 				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
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692|    |-					return true;
|    | 692|+				return true;
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
|    | [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
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693|    |-				}
|    | 693|+			}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// 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
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693| 693| 				}
| 694|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 694|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					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
| 692| 692| 					return true;
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695|    |-				{
|    | 695|+			{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					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
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696|    |-					// reset to normal input mode
|    | 696|+				// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697|    |-					placementSupport.Reset();
|    | 697|+				placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					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
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698|    |-					updateBuildingPlacementPreview();
|    | 698|+				updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					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
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700|    |-					inputState = INPUT_NORMAL;
|    | 700|+				inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702| 702| 				}
| 703| 703| 				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
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701|    |-					return true;
|    | 701|+				return true;
| 702| 702| 				}
| 703| 703| 				break;
| 704| 704| 		}
|    | [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
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702|    |-				}
|    | 702|+			}
| 703| 703| 				break;
| 704| 704| 		}
| 705| 705| 		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
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702| 702| 				}
| 703|    |-				break;
|    | 703|+			break;
| 704| 704| 		}
| 705| 705| 		break;
| 706| 706| 
|    | [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
| 710| 710| 		case "mousemotion":
| 711| 711| 			let maxDragDelta = 16;
| 712| 712| 			if (g_DragStart.distanceTo(ev) >= maxDragDelta)
| 713|    |-			{
|    | 713|+			
| 714| 714| 				// Rotate in the direction of the mouse
| 715| 715| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 716|    |-			}
|    | 716|+			
| 717| 717| 			else
| 718| 718| 			{
| 719| 719| 				// 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
| 715| 715| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 716| 716| 			}
| 717| 717| 			else
| 718|    |-			{
|    | 718|+			
| 719| 719| 				// If the mouse is near the center, snap back to the default orientation
| 720| 720| 				placementSupport.SetDefaultAngle();
| 721|    |-			}
|    | 721|+			
| 722| 722| 
| 723| 723| 			var snapData = Engine.GuiInterfaceCall("GetFoundationSnapData", {
| 724| 724| 				"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
| 741| 741| 				// If shift is down, let the player continue placing another of the same building
| 742| 742| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 743| 743| 				if (tryPlaceBuilding(queued))
| 744|    |-				{
|    | 744|+				
| 745| 745| 					if (queued)
| 746| 746| 						inputState = INPUT_BUILDING_PLACEMENT;
| 747| 747| 					else
| 748| 748| 						inputState = INPUT_NORMAL;
| 749|    |-				}
|    | 749|+				
| 750| 750| 				else
| 751| 751| 				{
| 752| 752| 					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
| 748| 748| 						inputState = INPUT_NORMAL;
| 749| 749| 				}
| 750| 750| 				else
| 751|    |-				{
|    | 751|+				
| 752| 752| 					inputState = INPUT_BUILDING_PLACEMENT;
| 753|    |-				}
|    | 753|+				
| 754| 754| 				return true;
| 755| 755| 			}
| 756| 756| 			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
| 797| 797| 
| 798| 798| 	// Handle the time-warp testing features, restricted to single-player
| 799| 799| 	if (!g_IsNetworked && Engine.GetGUIObjectByName("devTimeWarp").checked)
| 800|    |-	{
|    | 800|+	
| 801| 801| 		if (ev.type == "hotkeydown" && ev.hotkey == "session.timewarp.fastforward")
| 802| 802| 			Engine.SetSimRate(20.0);
| 803| 803| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.fastforward")
| 804| 804| 			Engine.SetSimRate(1.0);
| 805| 805| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.rewind")
| 806| 806| 			Engine.RewindTimeWarp();
| 807|    |-	}
|    | 807|+	
| 808| 808| 
| 809| 809| 	if (ev.hotkey == "session.highlightguarding")
| 810| 810| 	{
|    | [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
| 856| 856| 			break;
| 857| 857| 
| 858| 858| 		case "hotkeydown":
| 859|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 859|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861| 861| 					let now = Date.now();
| 862| 862| 					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
| 857| 857| 
| 858| 858| 		case "hotkeydown":
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860|    |-				{
|    | 860|+			{
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
|    | [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
| 858| 858| 		case "hotkeydown":
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861|    |-					let now = Date.now();
|    | 861|+				let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						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
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861| 861| 					let now = Date.now();
| 862|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 862|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
|    | [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| 				{
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863|    |-					{
|    | 863|+				{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							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
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 864|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							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
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865|    |-						{
|    | 865|+					{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
|    | [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
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866|    |-							var sptr = ev.hotkey.split(".");
|    | 866|+						var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
|    | [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
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867|    |-							performGroup("snap", sptr[3]);
|    | 867|+						performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
| 870| 870| 					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
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868|    |-						}
|    | 868|+					}
| 869| 869| 					}
| 870| 870| 					else
| 871| 871| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869|    |-					}
|    | 869|+				}
| 870| 870| 					else
| 871| 871| 					{
| 872| 872| 						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
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
| 870|    |-					else
|    | 870|+				else
| 871| 871| 					{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						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
| 868| 868| 						}
| 869| 869| 					}
| 870| 870| 					else
| 871|    |-					{
|    | 871|+				{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 869| 869| 					}
| 870| 870| 					else
| 871| 871| 					{
| 872|    |-						var sptr = ev.hotkey.split(".");
|    | 872|+					var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						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
| 870| 870| 					else
| 871| 871| 					{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873|    |-						performGroup(sptr[2], sptr[3]);
|    | 873|+					performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						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
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875|    |-						doublePressTimer = now;
|    | 875|+					doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876|    |-						prevHotkey = ev.hotkey;
|    | 876|+					prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
| 879| 879| 				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
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877|    |-					}
|    | 877|+				}
| 878| 878| 				}
| 879| 879| 				break;
| 880| 880| 		}
|    | [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
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878|    |-				}
|    | 878|+			}
| 879| 879| 				break;
| 880| 880| 		}
| 881| 881| 		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
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
| 879|    |-				break;
|    | 879|+			break;
| 880| 880| 		}
| 881| 881| 		break;
| 882| 882| 
|    | [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
|1044|1044| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1045|1045| 
|1046|1046| 			if (placementSupport.mode === "wall")
|1047|    |-			{
|    |1047|+			
|1048|1048| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1049|1049| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1050|1050| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1051|1051| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1052|    |-			}
|    |1052|+			
|1053|1053| 			else
|1054|1054| 			{
|1055|1055| 				// 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
|1319|1319| 	if (templateData.attack &&
|1320|1320| 		templateData.attack.Ranged &&
|1321|1321| 		templateData.attack.Ranged.maxRange)
|1322|    |-	{
|    |1322|+	
|1323|1323| 		// add attack information to display a good tooltip
|1324|1324| 		placementSupport.attack = templateData.attack;
|1325|    |-	}
|    |1325|+	
|1326|1326| }
|1327|1327| 
|1328|1328| // 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
|1403|1403| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1404|1404| 	{
|1405|1405| 		if (inputState == INPUT_BATCHTRAINING)
|1406|    |-		{
|    |1406|+		
|1407|1407| 			// Check if we are training in the same building(s) as the last batch
|1408|1408| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1409|1409| 			// If the order changed, we have a new selection and we should create a new batch.
|1436|1436| 			else if (!decrement)
|1437|1437| 				flushTrainingBatch();
|1438|1438| 				// fall through to create the new batch
|1439|    |-		}
|    |1439|+		
|1440|1440| 
|1441|1441| 		// Don't start a new batch if decrementing or unable to afford it.
|1442|1442| 		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
|1435|1435| 			// Otherwise start a new one
|1436|1436| 			else if (!decrement)
|1437|1437| 				flushTrainingBatch();
|1438|    |-				// fall through to create the new batch
|    |1438|+			// fall through to create the new batch
|1439|1439| 		}
|1440|1440| 
|1441|1441| 		// 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
|1513|1513| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1514|1514| 	{
|1515|1515| 		// Train as many full batches as we can
|1516|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1516|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1517|1517| 		Engine.PostNetworkCommand({
|1518|1518| 			"type": "train",
|1519|1519| 			"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
|1592|1592| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1593|1593| 
|1594|1594| 	// Reset the last idle unit, etc., if the selection type has changed.
|1595|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1595|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1596|1596| 		resetIdleUnit();
|1597|1597| 	lastIdleClasses = classes;
|1598|1598| 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

luiko updated this revision to Diff 7723.Apr 12 2019, 12:50 AM

add reference of first contribution

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

Linter detected issues:
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
| 181| 181| 		}
| 182| 182| 	}
| 183| 183| 	else if (placementSupport.mode === "wall")
| 184|    |-	{
|    | 184|+	
| 185| 185| 		if (placementSupport.wallSet && placementSupport.position)
| 186| 186| 		{
| 187| 187| 			// Fetch an updated list of snapping candidate entities
| 199| 199| 				"snapEntities": placementSupport.wallSnapEntities,	// snapping entities (towers) for starting a wall segment
| 200| 200| 			});
| 201| 201| 		}
| 202|    |-	}
|    | 202|+	
| 203| 203| 
| 204| 204| 	return false;
| 205| 205| }
|    | [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
| 288| 288| 	}
| 289| 289| 
| 290| 290| 	if (!updateBuildingPlacementPreview())
| 291|    |-	{
|    | 291|+	
| 292| 292| 		// invalid location - don't build it
| 293| 293| 		// TODO: play a sound?
| 294| 294| 		return false;
| 295|    |-	}
|    | 295|+	
| 296| 296| 
| 297| 297| 	var selection = g_Selection.toList();
| 298| 298| 
|    | [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
| 327| 327| 	}
| 328| 328| 
| 329| 329| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 330|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 330|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 331| 331| 	{
| 332| 332| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 333| 333| 		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
| 354| 354| 	// (this is somewhat non-ideal and hardcode-ish)
| 355| 355| 	var hasWallSegment = false;
| 356| 356| 	for (let piece of cmd.pieces)
| 357|    |-	{
|    | 357|+	
| 358| 358| 		if (piece.template != cmd.wallSet.templates.tower) // TODO: hardcode-ish :(
| 359| 359| 		{
| 360| 360| 			hasWallSegment = true;
| 361| 361| 			break;
| 362| 362| 		}
| 363|    |-	}
|    | 363|+	
| 364| 364| 
| 365| 365| 	if (hasWallSegment)
| 366| 366| 	{
|    | [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
| 477| 477| 	mouseIsOverObject = (hoveredObject != null);
| 478| 478| 
| 479| 479| 	// Close the menu when interacting with the game world
| 480|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 481|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 480|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 481|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 482| 482| 		closeMenu();
| 483| 483| 
| 484| 484| 	// 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
| 518| 518| 
| 519| 519| 				// Update the list of selected units
| 520| 520| 				if (Engine.HotkeyIsPressed("selection.add"))
| 521|    |-				{
|    | 521|+				
| 522| 522| 					g_Selection.addList(ents);
| 523|    |-				}
|    | 523|+				
| 524| 524| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 525| 525| 				{
| 526| 526| 					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
| 522| 522| 					g_Selection.addList(ents);
| 523| 523| 				}
| 524| 524| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 525|    |-				{
|    | 525|+				
| 526| 526| 					g_Selection.removeList(ents);
| 527|    |-				}
|    | 527|+				
| 528| 528| 				else
| 529| 529| 				{
| 530| 530| 					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
| 578| 578| 				// If shift is down, let the player continue placing another of the same building
| 579| 579| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 580| 580| 				if (tryPlaceBuilding(queued))
| 581|    |-				{
|    | 581|+				
| 582| 582| 					if (queued)
| 583| 583| 						inputState = INPUT_BUILDING_PLACEMENT;
| 584| 584| 					else
| 585| 585| 						inputState = INPUT_NORMAL;
| 586|    |-				}
|    | 586|+				
| 587| 587| 				else
| 588| 588| 				{
| 589| 589| 					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
| 585| 585| 						inputState = INPUT_NORMAL;
| 586| 586| 				}
| 587| 587| 				else
| 588|    |-				{
|    | 588|+				
| 589| 589| 					inputState = INPUT_BUILDING_PLACEMENT;
| 590|    |-				}
|    | 590|+				
| 591| 591| 				return true;
| 592| 592| 			}
| 593| 593| 			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
| 638| 638| 		// user to continue building walls.
| 639| 639| 		switch (ev.type)
| 640| 640| 		{
| 641|    |-			case "mousemotion":
|    | 641|+		case "mousemotion":
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// 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
| 639| 639| 		switch (ev.type)
| 640| 640| 		{
| 641| 641| 			case "mousemotion":
| 642|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 642|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// 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
| 641| 641| 			case "mousemotion":
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644|    |-				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 644|+			// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// 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
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645|    |-				// the ending point and the starting point to snap to.
|    | 645|+			// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// 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
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646|    |-				//
|    | 646|+			//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// 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
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 647|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// 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
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 648|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// 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
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 649|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// 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
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 650|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
|    | [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| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 651|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
| 654| 654| 				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
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652|    |-				// points.
|    | 652|+			// points.
| 653| 653| 
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				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
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
| 654|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 654|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				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
| 652| 652| 				// points.
| 653| 653| 
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 655|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657|    |-				if (result && result.cost)
|    | 657|+			if (result && result.cost)
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					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
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658|    |-				{
|    | 658|+			{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						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
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
| 659|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 659|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						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
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660|    |-					placementSupport.tooltipMessage = [
|    | 660|+				placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].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
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661|    |-						getEntityCostTooltip(result),
|    | 661|+					getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
|    | [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
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662|    |-						getNeededResourcesTooltip(neededResources)
|    | 662|+					getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
|    | [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
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663|    |-					].filter(tip => tip).join("\n");
|    | 663|+				].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
| 666| 666| 				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
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664|    |-				}
|    | 664|+			}
| 665| 665| 
| 666| 666| 				break;
| 667| 667| 
|    | [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
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
| 666|    |-				break;
|    | 666|+			break;
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				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
| 665| 665| 
| 666| 666| 				break;
| 667| 667| 
| 668|    |-			case "mousebuttondown":
|    | 668|+		case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					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
| 666| 666| 				break;
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 669|+			if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					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
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670|    |-				{
|    | 670|+			{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
|    | [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
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 671|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						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
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672|    |-					if (tryPlaceWall(queued))
|    | 672|+				if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675| 675| 						{
|    | [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
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673|    |-					{
|    | 673|+					
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687|    |-					}
|    | 687|+					
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
|    | [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
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673|    |-					{
|    | 673|+				{
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// 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
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674|    |-						if (queued)
|    | 674|+					if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							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
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675|    |-						{
|    | 675|+					{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							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
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676|    |-							// continue building, just set a new starting position where we left off
|    | 676|+						// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 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| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 677|+						placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							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
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678|    |-							placementSupport.wallEndPosition = undefined;
|    | 678|+						placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
|    | [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
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 680|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682| 682| 						else
| 683| 683| 						{
|    | [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
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681|    |-						}
|    | 681|+					}
| 682| 682| 						else
| 683| 683| 						{
| 684| 684| 							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
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682|    |-						else
|    | 682|+					else
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							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
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682| 682| 						else
| 683|    |-						{
|    | 683|+					{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 681| 681| 						}
| 682| 682| 						else
| 683| 683| 						{
| 684|    |-							placementSupport.Reset();
|    | 684|+						placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 682| 682| 						else
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685|    |-							inputState = INPUT_NORMAL;
|    | 685|+						inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
| 688| 688| 					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
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686|    |-						}
|    | 686|+					}
| 687| 687| 					}
| 688| 688| 					else
| 689| 689| 						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
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687|    |-					}
|    | 687|+				}
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
|    | [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
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
| 688|    |-					else
|    | 688|+				else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					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
| 686| 686| 						}
| 687| 687| 					}
| 688| 688| 					else
| 689|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 689|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					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
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691|    |-					updateBuildingPlacementPreview();
|    | 691|+				updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693| 693| 				}
| 694| 694| 				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
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692|    |-					return true;
|    | 692|+				return true;
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
|    | [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
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693|    |-				}
|    | 693|+			}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// 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
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693| 693| 				}
| 694|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 694|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					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
| 692| 692| 					return true;
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695|    |-				{
|    | 695|+			{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					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
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696|    |-					// reset to normal input mode
|    | 696|+				// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697|    |-					placementSupport.Reset();
|    | 697|+				placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					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
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698|    |-					updateBuildingPlacementPreview();
|    | 698|+				updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					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
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700|    |-					inputState = INPUT_NORMAL;
|    | 700|+				inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702| 702| 				}
| 703| 703| 				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
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701|    |-					return true;
|    | 701|+				return true;
| 702| 702| 				}
| 703| 703| 				break;
| 704| 704| 		}
|    | [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
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702|    |-				}
|    | 702|+			}
| 703| 703| 				break;
| 704| 704| 		}
| 705| 705| 		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
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702| 702| 				}
| 703|    |-				break;
|    | 703|+			break;
| 704| 704| 		}
| 705| 705| 		break;
| 706| 706| 
|    | [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
| 710| 710| 		case "mousemotion":
| 711| 711| 			let maxDragDelta = 16;
| 712| 712| 			if (g_DragStart.distanceTo(ev) >= maxDragDelta)
| 713|    |-			{
|    | 713|+			
| 714| 714| 				// Rotate in the direction of the mouse
| 715| 715| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 716|    |-			}
|    | 716|+			
| 717| 717| 			else
| 718| 718| 			{
| 719| 719| 				// 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
| 715| 715| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 716| 716| 			}
| 717| 717| 			else
| 718|    |-			{
|    | 718|+			
| 719| 719| 				// If the mouse is near the center, snap back to the default orientation
| 720| 720| 				placementSupport.SetDefaultAngle();
| 721|    |-			}
|    | 721|+			
| 722| 722| 
| 723| 723| 			var snapData = Engine.GuiInterfaceCall("GetFoundationSnapData", {
| 724| 724| 				"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
| 741| 741| 				// If shift is down, let the player continue placing another of the same building
| 742| 742| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 743| 743| 				if (tryPlaceBuilding(queued))
| 744|    |-				{
|    | 744|+				
| 745| 745| 					if (queued)
| 746| 746| 						inputState = INPUT_BUILDING_PLACEMENT;
| 747| 747| 					else
| 748| 748| 						inputState = INPUT_NORMAL;
| 749|    |-				}
|    | 749|+				
| 750| 750| 				else
| 751| 751| 				{
| 752| 752| 					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
| 748| 748| 						inputState = INPUT_NORMAL;
| 749| 749| 				}
| 750| 750| 				else
| 751|    |-				{
|    | 751|+				
| 752| 752| 					inputState = INPUT_BUILDING_PLACEMENT;
| 753|    |-				}
|    | 753|+				
| 754| 754| 				return true;
| 755| 755| 			}
| 756| 756| 			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
| 797| 797| 
| 798| 798| 	// Handle the time-warp testing features, restricted to single-player
| 799| 799| 	if (!g_IsNetworked && Engine.GetGUIObjectByName("devTimeWarp").checked)
| 800|    |-	{
|    | 800|+	
| 801| 801| 		if (ev.type == "hotkeydown" && ev.hotkey == "session.timewarp.fastforward")
| 802| 802| 			Engine.SetSimRate(20.0);
| 803| 803| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.fastforward")
| 804| 804| 			Engine.SetSimRate(1.0);
| 805| 805| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.rewind")
| 806| 806| 			Engine.RewindTimeWarp();
| 807|    |-	}
|    | 807|+	
| 808| 808| 
| 809| 809| 	if (ev.hotkey == "session.highlightguarding")
| 810| 810| 	{
|    | [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
| 856| 856| 			break;
| 857| 857| 
| 858| 858| 		case "hotkeydown":
| 859|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 859|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861| 861| 					let now = Date.now();
| 862| 862| 					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
| 857| 857| 
| 858| 858| 		case "hotkeydown":
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860|    |-				{
|    | 860|+			{
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
|    | [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
| 858| 858| 		case "hotkeydown":
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861|    |-					let now = Date.now();
|    | 861|+				let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						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
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861| 861| 					let now = Date.now();
| 862|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 862|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
|    | [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| 				{
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863|    |-					{
|    | 863|+				{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							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
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 864|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							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
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865|    |-						{
|    | 865|+					{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
|    | [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
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866|    |-							var sptr = ev.hotkey.split(".");
|    | 866|+						var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
|    | [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
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867|    |-							performGroup("snap", sptr[3]);
|    | 867|+						performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
| 870| 870| 					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
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868|    |-						}
|    | 868|+					}
| 869| 869| 					}
| 870| 870| 					else
| 871| 871| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869|    |-					}
|    | 869|+				}
| 870| 870| 					else
| 871| 871| 					{
| 872| 872| 						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
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
| 870|    |-					else
|    | 870|+				else
| 871| 871| 					{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						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
| 868| 868| 						}
| 869| 869| 					}
| 870| 870| 					else
| 871|    |-					{
|    | 871|+				{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 869| 869| 					}
| 870| 870| 					else
| 871| 871| 					{
| 872|    |-						var sptr = ev.hotkey.split(".");
|    | 872|+					var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						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
| 870| 870| 					else
| 871| 871| 					{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873|    |-						performGroup(sptr[2], sptr[3]);
|    | 873|+					performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						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
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875|    |-						doublePressTimer = now;
|    | 875|+					doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876|    |-						prevHotkey = ev.hotkey;
|    | 876|+					prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
| 879| 879| 				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
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877|    |-					}
|    | 877|+				}
| 878| 878| 				}
| 879| 879| 				break;
| 880| 880| 		}
|    | [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
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878|    |-				}
|    | 878|+			}
| 879| 879| 				break;
| 880| 880| 		}
| 881| 881| 		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
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
| 879|    |-				break;
|    | 879|+			break;
| 880| 880| 		}
| 881| 881| 		break;
| 882| 882| 
|    | [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
|1044|1044| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1045|1045| 
|1046|1046| 			if (placementSupport.mode === "wall")
|1047|    |-			{
|    |1047|+			
|1048|1048| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1049|1049| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1050|1050| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1051|1051| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1052|    |-			}
|    |1052|+			
|1053|1053| 			else
|1054|1054| 			{
|1055|1055| 				// 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
|1319|1319| 	if (templateData.attack &&
|1320|1320| 		templateData.attack.Ranged &&
|1321|1321| 		templateData.attack.Ranged.maxRange)
|1322|    |-	{
|    |1322|+	
|1323|1323| 		// add attack information to display a good tooltip
|1324|1324| 		placementSupport.attack = templateData.attack;
|1325|    |-	}
|    |1325|+	
|1326|1326| }
|1327|1327| 
|1328|1328| // 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
|1403|1403| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1404|1404| 	{
|1405|1405| 		if (inputState == INPUT_BATCHTRAINING)
|1406|    |-		{
|    |1406|+		
|1407|1407| 			// Check if we are training in the same building(s) as the last batch
|1408|1408| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1409|1409| 			// If the order changed, we have a new selection and we should create a new batch.
|1436|1436| 			else if (!decrement)
|1437|1437| 				flushTrainingBatch();
|1438|1438| 				// fall through to create the new batch
|1439|    |-		}
|    |1439|+		
|1440|1440| 
|1441|1441| 		// Don't start a new batch if decrementing or unable to afford it.
|1442|1442| 		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
|1435|1435| 			// Otherwise start a new one
|1436|1436| 			else if (!decrement)
|1437|1437| 				flushTrainingBatch();
|1438|    |-				// fall through to create the new batch
|    |1438|+			// fall through to create the new batch
|1439|1439| 		}
|1440|1440| 
|1441|1441| 		// 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
|1513|1513| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1514|1514| 	{
|1515|1515| 		// Train as many full batches as we can
|1516|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1516|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1517|1517| 		Engine.PostNetworkCommand({
|1518|1518| 			"type": "train",
|1519|1519| 			"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
|1592|1592| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1593|1593| 
|1594|1594| 	// Reset the last idle unit, etc., if the selection type has changed.
|1595|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1595|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1596|1596| 		resetIdleUnit();
|1597|1597| 	lastIdleClasses = classes;
|1598|1598| 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Stan added a subscriber: elexis.Apr 12 2019, 8:13 AM
Stan added inline comments.
binaries/data/mods/public/gui/session/input.js
1238

I'm not sure that comment is still accurate since now the order one can be any key you want. Also I think it's ALT but I'm not sure one would have to check the wiki Hotkeys patch.

1243

(!(a && b) ) <==> (!a || !b) Not sure which one is more readable.

@elexis, shouldn't we check for g_UnitActions && g_UnitActions.length ?

lyv added a subscriber: lyv.Apr 12 2019, 8:17 AM

I still have no clue what this feature is? Does it allow giving order to one unit even though you have multiple selections?

Stan added a comment.Apr 12 2019, 8:46 AM

That you could already do. However what you couldn't do is have the same behavior clicking on the minimap

Silier added a subscriber: Silier.Apr 12 2019, 2:36 PM
Silier added inline comments.
binaries/data/mods/public/gui/session/input.js
1238

it is shift to queue orderds :)

1243

g_UnitActions is initialised non empty in unit_actions.js so thiese checks would be redundant

I think ! a || !b is easier to read

bb added a subscriber: bb.Apr 12 2019, 3:15 PM
bb added inline comments.
binaries/data/mods/public/gui/session/input.js
1236–1264

we only handle 1 action at at a time and we have g_UnitActions so I propose handleUnitAction

1240

I don't recall any convention on consts inside function. We seem to be using let everywhere however

luiko updated this revision to Diff 7731.Apr 12 2019, 7:53 PM
luiko marked 3 inline comments as done.
luiko edited the summary of this revision. (Show Details)

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

Linter detected issues:
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
| 181| 181| 		}
| 182| 182| 	}
| 183| 183| 	else if (placementSupport.mode === "wall")
| 184|    |-	{
|    | 184|+	
| 185| 185| 		if (placementSupport.wallSet && placementSupport.position)
| 186| 186| 		{
| 187| 187| 			// Fetch an updated list of snapping candidate entities
| 199| 199| 				"snapEntities": placementSupport.wallSnapEntities,	// snapping entities (towers) for starting a wall segment
| 200| 200| 			});
| 201| 201| 		}
| 202|    |-	}
|    | 202|+	
| 203| 203| 
| 204| 204| 	return false;
| 205| 205| }
|    | [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
| 288| 288| 	}
| 289| 289| 
| 290| 290| 	if (!updateBuildingPlacementPreview())
| 291|    |-	{
|    | 291|+	
| 292| 292| 		// invalid location - don't build it
| 293| 293| 		// TODO: play a sound?
| 294| 294| 		return false;
| 295|    |-	}
|    | 295|+	
| 296| 296| 
| 297| 297| 	var selection = g_Selection.toList();
| 298| 298| 
|    | [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
| 327| 327| 	}
| 328| 328| 
| 329| 329| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 330|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 330|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 331| 331| 	{
| 332| 332| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 333| 333| 		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
| 354| 354| 	// (this is somewhat non-ideal and hardcode-ish)
| 355| 355| 	var hasWallSegment = false;
| 356| 356| 	for (let piece of cmd.pieces)
| 357|    |-	{
|    | 357|+	
| 358| 358| 		if (piece.template != cmd.wallSet.templates.tower) // TODO: hardcode-ish :(
| 359| 359| 		{
| 360| 360| 			hasWallSegment = true;
| 361| 361| 			break;
| 362| 362| 		}
| 363|    |-	}
|    | 363|+	
| 364| 364| 
| 365| 365| 	if (hasWallSegment)
| 366| 366| 	{
|    | [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
| 477| 477| 	mouseIsOverObject = (hoveredObject != null);
| 478| 478| 
| 479| 479| 	// Close the menu when interacting with the game world
| 480|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 481|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 480|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 481|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 482| 482| 		closeMenu();
| 483| 483| 
| 484| 484| 	// 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
| 518| 518| 
| 519| 519| 				// Update the list of selected units
| 520| 520| 				if (Engine.HotkeyIsPressed("selection.add"))
| 521|    |-				{
|    | 521|+				
| 522| 522| 					g_Selection.addList(ents);
| 523|    |-				}
|    | 523|+				
| 524| 524| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 525| 525| 				{
| 526| 526| 					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
| 522| 522| 					g_Selection.addList(ents);
| 523| 523| 				}
| 524| 524| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 525|    |-				{
|    | 525|+				
| 526| 526| 					g_Selection.removeList(ents);
| 527|    |-				}
|    | 527|+				
| 528| 528| 				else
| 529| 529| 				{
| 530| 530| 					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
| 578| 578| 				// If shift is down, let the player continue placing another of the same building
| 579| 579| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 580| 580| 				if (tryPlaceBuilding(queued))
| 581|    |-				{
|    | 581|+				
| 582| 582| 					if (queued)
| 583| 583| 						inputState = INPUT_BUILDING_PLACEMENT;
| 584| 584| 					else
| 585| 585| 						inputState = INPUT_NORMAL;
| 586|    |-				}
|    | 586|+				
| 587| 587| 				else
| 588| 588| 				{
| 589| 589| 					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
| 585| 585| 						inputState = INPUT_NORMAL;
| 586| 586| 				}
| 587| 587| 				else
| 588|    |-				{
|    | 588|+				
| 589| 589| 					inputState = INPUT_BUILDING_PLACEMENT;
| 590|    |-				}
|    | 590|+				
| 591| 591| 				return true;
| 592| 592| 			}
| 593| 593| 			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
| 638| 638| 		// user to continue building walls.
| 639| 639| 		switch (ev.type)
| 640| 640| 		{
| 641|    |-			case "mousemotion":
|    | 641|+		case "mousemotion":
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// 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
| 639| 639| 		switch (ev.type)
| 640| 640| 		{
| 641| 641| 			case "mousemotion":
| 642|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 642|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// 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
| 641| 641| 			case "mousemotion":
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644|    |-				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 644|+			// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// 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
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645|    |-				// the ending point and the starting point to snap to.
|    | 645|+			// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// 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
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646|    |-				//
|    | 646|+			//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// 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
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 647|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// 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
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 648|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// 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
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 649|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// 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
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 650|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
|    | [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| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 651|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
| 654| 654| 				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
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652|    |-				// points.
|    | 652|+			// points.
| 653| 653| 
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				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
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
| 654|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 654|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				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
| 652| 652| 				// points.
| 653| 653| 
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 655|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657|    |-				if (result && result.cost)
|    | 657|+			if (result && result.cost)
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					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
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658|    |-				{
|    | 658|+			{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						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
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
| 659|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 659|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						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
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660|    |-					placementSupport.tooltipMessage = [
|    | 660|+				placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].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
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661|    |-						getEntityCostTooltip(result),
|    | 661|+					getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
|    | [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
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662|    |-						getNeededResourcesTooltip(neededResources)
|    | 662|+					getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
|    | [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
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663|    |-					].filter(tip => tip).join("\n");
|    | 663|+				].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
| 666| 666| 				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
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664|    |-				}
|    | 664|+			}
| 665| 665| 
| 666| 666| 				break;
| 667| 667| 
|    | [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
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
| 666|    |-				break;
|    | 666|+			break;
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				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
| 665| 665| 
| 666| 666| 				break;
| 667| 667| 
| 668|    |-			case "mousebuttondown":
|    | 668|+		case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					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
| 666| 666| 				break;
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 669|+			if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					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
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670|    |-				{
|    | 670|+			{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
|    | [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
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 671|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						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
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672|    |-					if (tryPlaceWall(queued))
|    | 672|+				if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675| 675| 						{
|    | [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
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673|    |-					{
|    | 673|+					
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687|    |-					}
|    | 687|+					
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
|    | [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
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673|    |-					{
|    | 673|+				{
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// 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
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674|    |-						if (queued)
|    | 674|+					if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							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
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675|    |-						{
|    | 675|+					{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							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
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676|    |-							// continue building, just set a new starting position where we left off
|    | 676|+						// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 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| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 677|+						placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							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
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678|    |-							placementSupport.wallEndPosition = undefined;
|    | 678|+						placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
|    | [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
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 680|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682| 682| 						else
| 683| 683| 						{
|    | [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
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681|    |-						}
|    | 681|+					}
| 682| 682| 						else
| 683| 683| 						{
| 684| 684| 							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
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682|    |-						else
|    | 682|+					else
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							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
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682| 682| 						else
| 683|    |-						{
|    | 683|+					{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 681| 681| 						}
| 682| 682| 						else
| 683| 683| 						{
| 684|    |-							placementSupport.Reset();
|    | 684|+						placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 682| 682| 						else
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685|    |-							inputState = INPUT_NORMAL;
|    | 685|+						inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
| 688| 688| 					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
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686|    |-						}
|    | 686|+					}
| 687| 687| 					}
| 688| 688| 					else
| 689| 689| 						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
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687|    |-					}
|    | 687|+				}
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
|    | [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
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
| 688|    |-					else
|    | 688|+				else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					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
| 686| 686| 						}
| 687| 687| 					}
| 688| 688| 					else
| 689|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 689|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					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
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691|    |-					updateBuildingPlacementPreview();
|    | 691|+				updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693| 693| 				}
| 694| 694| 				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
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692|    |-					return true;
|    | 692|+				return true;
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
|    | [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
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693|    |-				}
|    | 693|+			}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// 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
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693| 693| 				}
| 694|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 694|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					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
| 692| 692| 					return true;
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695|    |-				{
|    | 695|+			{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					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
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696|    |-					// reset to normal input mode
|    | 696|+				// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697|    |-					placementSupport.Reset();
|    | 697|+				placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					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
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698|    |-					updateBuildingPlacementPreview();
|    | 698|+				updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					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
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700|    |-					inputState = INPUT_NORMAL;
|    | 700|+				inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702| 702| 				}
| 703| 703| 				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
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701|    |-					return true;
|    | 701|+				return true;
| 702| 702| 				}
| 703| 703| 				break;
| 704| 704| 		}
|    | [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
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702|    |-				}
|    | 702|+			}
| 703| 703| 				break;
| 704| 704| 		}
| 705| 705| 		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
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702| 702| 				}
| 703|    |-				break;
|    | 703|+			break;
| 704| 704| 		}
| 705| 705| 		break;
| 706| 706| 
|    | [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
| 710| 710| 		case "mousemotion":
| 711| 711| 			let maxDragDelta = 16;
| 712| 712| 			if (g_DragStart.distanceTo(ev) >= maxDragDelta)
| 713|    |-			{
|    | 713|+			
| 714| 714| 				// Rotate in the direction of the mouse
| 715| 715| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 716|    |-			}
|    | 716|+			
| 717| 717| 			else
| 718| 718| 			{
| 719| 719| 				// 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
| 715| 715| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 716| 716| 			}
| 717| 717| 			else
| 718|    |-			{
|    | 718|+			
| 719| 719| 				// If the mouse is near the center, snap back to the default orientation
| 720| 720| 				placementSupport.SetDefaultAngle();
| 721|    |-			}
|    | 721|+			
| 722| 722| 
| 723| 723| 			var snapData = Engine.GuiInterfaceCall("GetFoundationSnapData", {
| 724| 724| 				"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
| 741| 741| 				// If shift is down, let the player continue placing another of the same building
| 742| 742| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 743| 743| 				if (tryPlaceBuilding(queued))
| 744|    |-				{
|    | 744|+				
| 745| 745| 					if (queued)
| 746| 746| 						inputState = INPUT_BUILDING_PLACEMENT;
| 747| 747| 					else
| 748| 748| 						inputState = INPUT_NORMAL;
| 749|    |-				}
|    | 749|+				
| 750| 750| 				else
| 751| 751| 				{
| 752| 752| 					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
| 748| 748| 						inputState = INPUT_NORMAL;
| 749| 749| 				}
| 750| 750| 				else
| 751|    |-				{
|    | 751|+				
| 752| 752| 					inputState = INPUT_BUILDING_PLACEMENT;
| 753|    |-				}
|    | 753|+				
| 754| 754| 				return true;
| 755| 755| 			}
| 756| 756| 			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
| 797| 797| 
| 798| 798| 	// Handle the time-warp testing features, restricted to single-player
| 799| 799| 	if (!g_IsNetworked && Engine.GetGUIObjectByName("devTimeWarp").checked)
| 800|    |-	{
|    | 800|+	
| 801| 801| 		if (ev.type == "hotkeydown" && ev.hotkey == "session.timewarp.fastforward")
| 802| 802| 			Engine.SetSimRate(20.0);
| 803| 803| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.fastforward")
| 804| 804| 			Engine.SetSimRate(1.0);
| 805| 805| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.rewind")
| 806| 806| 			Engine.RewindTimeWarp();
| 807|    |-	}
|    | 807|+	
| 808| 808| 
| 809| 809| 	if (ev.hotkey == "session.highlightguarding")
| 810| 810| 	{
|    | [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
| 856| 856| 			break;
| 857| 857| 
| 858| 858| 		case "hotkeydown":
| 859|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 859|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861| 861| 					let now = Date.now();
| 862| 862| 					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
| 857| 857| 
| 858| 858| 		case "hotkeydown":
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860|    |-				{
|    | 860|+			{
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
|    | [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
| 858| 858| 		case "hotkeydown":
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861|    |-					let now = Date.now();
|    | 861|+				let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						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
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861| 861| 					let now = Date.now();
| 862|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 862|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
|    | [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| 				{
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863|    |-					{
|    | 863|+				{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							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
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 864|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							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
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865|    |-						{
|    | 865|+					{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
|    | [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
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866|    |-							var sptr = ev.hotkey.split(".");
|    | 866|+						var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
|    | [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
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867|    |-							performGroup("snap", sptr[3]);
|    | 867|+						performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
| 870| 870| 					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
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868|    |-						}
|    | 868|+					}
| 869| 869| 					}
| 870| 870| 					else
| 871| 871| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869|    |-					}
|    | 869|+				}
| 870| 870| 					else
| 871| 871| 					{
| 872| 872| 						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
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
| 870|    |-					else
|    | 870|+				else
| 871| 871| 					{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						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
| 868| 868| 						}
| 869| 869| 					}
| 870| 870| 					else
| 871|    |-					{
|    | 871|+				{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 869| 869| 					}
| 870| 870| 					else
| 871| 871| 					{
| 872|    |-						var sptr = ev.hotkey.split(".");
|    | 872|+					var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						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
| 870| 870| 					else
| 871| 871| 					{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873|    |-						performGroup(sptr[2], sptr[3]);
|    | 873|+					performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						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
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875|    |-						doublePressTimer = now;
|    | 875|+					doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876|    |-						prevHotkey = ev.hotkey;
|    | 876|+					prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
| 879| 879| 				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
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877|    |-					}
|    | 877|+				}
| 878| 878| 				}
| 879| 879| 				break;
| 880| 880| 		}
|    | [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
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878|    |-				}
|    | 878|+			}
| 879| 879| 				break;
| 880| 880| 		}
| 881| 881| 		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
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
| 879|    |-				break;
|    | 879|+			break;
| 880| 880| 		}
| 881| 881| 		break;
| 882| 882| 
|    | [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
|1044|1044| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1045|1045| 
|1046|1046| 			if (placementSupport.mode === "wall")
|1047|    |-			{
|    |1047|+			
|1048|1048| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1049|1049| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1050|1050| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1051|1051| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1052|    |-			}
|    |1052|+			
|1053|1053| 			else
|1054|1054| 			{
|1055|1055| 				// 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
|1319|1319| 	if (templateData.attack &&
|1320|1320| 		templateData.attack.Ranged &&
|1321|1321| 		templateData.attack.Ranged.maxRange)
|1322|    |-	{
|    |1322|+	
|1323|1323| 		// add attack information to display a good tooltip
|1324|1324| 		placementSupport.attack = templateData.attack;
|1325|    |-	}
|    |1325|+	
|1326|1326| }
|1327|1327| 
|1328|1328| // 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
|1403|1403| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1404|1404| 	{
|1405|1405| 		if (inputState == INPUT_BATCHTRAINING)
|1406|    |-		{
|    |1406|+		
|1407|1407| 			// Check if we are training in the same building(s) as the last batch
|1408|1408| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1409|1409| 			// If the order changed, we have a new selection and we should create a new batch.
|1436|1436| 			else if (!decrement)
|1437|1437| 				flushTrainingBatch();
|1438|1438| 				// fall through to create the new batch
|1439|    |-		}
|    |1439|+		
|1440|1440| 
|1441|1441| 		// Don't start a new batch if decrementing or unable to afford it.
|1442|1442| 		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
|1435|1435| 			// Otherwise start a new one
|1436|1436| 			else if (!decrement)
|1437|1437| 				flushTrainingBatch();
|1438|    |-				// fall through to create the new batch
|    |1438|+			// fall through to create the new batch
|1439|1439| 		}
|1440|1440| 
|1441|1441| 		// 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
|1513|1513| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1514|1514| 	{
|1515|1515| 		// Train as many full batches as we can
|1516|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1516|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1517|1517| 		Engine.PostNetworkCommand({
|1518|1518| 			"type": "train",
|1519|1519| 			"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
|1592|1592| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1593|1593| 
|1594|1594| 	// Reset the last idle unit, etc., if the selection type has changed.
|1595|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1595|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1596|1596| 		resetIdleUnit();
|1597|1597| 	lastIdleClasses = classes;
|1598|1598| 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

luiko added a comment.Apr 12 2019, 8:01 PM

function name and return condition changed

luiko added inline comments.Apr 12 2019, 9:29 PM
binaries/data/mods/public/gui/session/input.js
1240

It should, I prefer to use 'const' to specify that this identifier won't be reassigned I think is a plus to keep things simple.

I tried in game and one unit command works on minimap

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

this can go inline

1229

use let here please

luiko updated this revision to Diff 7739.Apr 12 2019, 9:57 PM
luiko marked 2 inline comments as done.
luiko retitled this revision from Handle hotkey to order only one unit with minimap to Handle hotkey to order only one unit on minimap.

mod inline variable

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

Linter detected issues:
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
| 181| 181| 		}
| 182| 182| 	}
| 183| 183| 	else if (placementSupport.mode === "wall")
| 184|    |-	{
|    | 184|+	
| 185| 185| 		if (placementSupport.wallSet && placementSupport.position)
| 186| 186| 		{
| 187| 187| 			// Fetch an updated list of snapping candidate entities
| 199| 199| 				"snapEntities": placementSupport.wallSnapEntities,	// snapping entities (towers) for starting a wall segment
| 200| 200| 			});
| 201| 201| 		}
| 202|    |-	}
|    | 202|+	
| 203| 203| 
| 204| 204| 	return false;
| 205| 205| }
|    | [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
| 288| 288| 	}
| 289| 289| 
| 290| 290| 	if (!updateBuildingPlacementPreview())
| 291|    |-	{
|    | 291|+	
| 292| 292| 		// invalid location - don't build it
| 293| 293| 		// TODO: play a sound?
| 294| 294| 		return false;
| 295|    |-	}
|    | 295|+	
| 296| 296| 
| 297| 297| 	var selection = g_Selection.toList();
| 298| 298| 
|    | [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
| 327| 327| 	}
| 328| 328| 
| 329| 329| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 330|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 330|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 331| 331| 	{
| 332| 332| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 333| 333| 		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
| 354| 354| 	// (this is somewhat non-ideal and hardcode-ish)
| 355| 355| 	var hasWallSegment = false;
| 356| 356| 	for (let piece of cmd.pieces)
| 357|    |-	{
|    | 357|+	
| 358| 358| 		if (piece.template != cmd.wallSet.templates.tower) // TODO: hardcode-ish :(
| 359| 359| 		{
| 360| 360| 			hasWallSegment = true;
| 361| 361| 			break;
| 362| 362| 		}
| 363|    |-	}
|    | 363|+	
| 364| 364| 
| 365| 365| 	if (hasWallSegment)
| 366| 366| 	{
|    | [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
| 477| 477| 	mouseIsOverObject = (hoveredObject != null);
| 478| 478| 
| 479| 479| 	// Close the menu when interacting with the game world
| 480|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 481|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 480|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 481|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 482| 482| 		closeMenu();
| 483| 483| 
| 484| 484| 	// 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
| 518| 518| 
| 519| 519| 				// Update the list of selected units
| 520| 520| 				if (Engine.HotkeyIsPressed("selection.add"))
| 521|    |-				{
|    | 521|+				
| 522| 522| 					g_Selection.addList(ents);
| 523|    |-				}
|    | 523|+				
| 524| 524| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 525| 525| 				{
| 526| 526| 					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
| 522| 522| 					g_Selection.addList(ents);
| 523| 523| 				}
| 524| 524| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 525|    |-				{
|    | 525|+				
| 526| 526| 					g_Selection.removeList(ents);
| 527|    |-				}
|    | 527|+				
| 528| 528| 				else
| 529| 529| 				{
| 530| 530| 					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
| 578| 578| 				// If shift is down, let the player continue placing another of the same building
| 579| 579| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 580| 580| 				if (tryPlaceBuilding(queued))
| 581|    |-				{
|    | 581|+				
| 582| 582| 					if (queued)
| 583| 583| 						inputState = INPUT_BUILDING_PLACEMENT;
| 584| 584| 					else
| 585| 585| 						inputState = INPUT_NORMAL;
| 586|    |-				}
|    | 586|+				
| 587| 587| 				else
| 588| 588| 				{
| 589| 589| 					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
| 585| 585| 						inputState = INPUT_NORMAL;
| 586| 586| 				}
| 587| 587| 				else
| 588|    |-				{
|    | 588|+				
| 589| 589| 					inputState = INPUT_BUILDING_PLACEMENT;
| 590|    |-				}
|    | 590|+				
| 591| 591| 				return true;
| 592| 592| 			}
| 593| 593| 			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
| 638| 638| 		// user to continue building walls.
| 639| 639| 		switch (ev.type)
| 640| 640| 		{
| 641|    |-			case "mousemotion":
|    | 641|+		case "mousemotion":
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// 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
| 639| 639| 		switch (ev.type)
| 640| 640| 		{
| 641| 641| 			case "mousemotion":
| 642|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 642|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// 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
| 641| 641| 			case "mousemotion":
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644|    |-				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 644|+			// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// 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
| 642| 642| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645|    |-				// the ending point and the starting point to snap to.
|    | 645|+			// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// 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
| 643| 643| 
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646|    |-				//
|    | 646|+			//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// 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
| 644| 644| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 647|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// 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
| 645| 645| 				// the ending point and the starting point to snap to.
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 648|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// 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
| 646| 646| 				//
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 649|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// 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
| 647| 647| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 648| 648| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 650|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
|    | [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| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 651|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
| 654| 654| 				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
| 649| 649| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 650| 650| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652|    |-				// points.
|    | 652|+			// points.
| 653| 653| 
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				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
| 651| 651| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 652| 652| 				// points.
| 653| 653| 
| 654|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 654|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				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
| 652| 652| 				// points.
| 653| 653| 
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 655|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 654| 654| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657|    |-				if (result && result.cost)
|    | 657|+			if (result && result.cost)
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					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
| 655| 655| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658|    |-				{
|    | 658|+			{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						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
| 656| 656| 
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
| 659|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 659|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						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
| 657| 657| 				if (result && result.cost)
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660|    |-					placementSupport.tooltipMessage = [
|    | 660|+				placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].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
| 658| 658| 				{
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661|    |-						getEntityCostTooltip(result),
|    | 661|+					getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
|    | [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
| 659| 659| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662|    |-						getNeededResourcesTooltip(neededResources)
|    | 662|+					getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
|    | [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
| 660| 660| 					placementSupport.tooltipMessage = [
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663|    |-					].filter(tip => tip).join("\n");
|    | 663|+				].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
| 666| 666| 				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
| 661| 661| 						getEntityCostTooltip(result),
| 662| 662| 						getNeededResourcesTooltip(neededResources)
| 663| 663| 					].filter(tip => tip).join("\n");
| 664|    |-				}
|    | 664|+			}
| 665| 665| 
| 666| 666| 				break;
| 667| 667| 
|    | [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
| 663| 663| 					].filter(tip => tip).join("\n");
| 664| 664| 				}
| 665| 665| 
| 666|    |-				break;
|    | 666|+			break;
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				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
| 665| 665| 
| 666| 666| 				break;
| 667| 667| 
| 668|    |-			case "mousebuttondown":
|    | 668|+		case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					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
| 666| 666| 				break;
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 669|+			if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					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
| 667| 667| 
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670|    |-				{
|    | 670|+			{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
|    | [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
| 668| 668| 			case "mousebuttondown":
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 671|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						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
| 669| 669| 				if (ev.button == SDL_BUTTON_LEFT)
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672|    |-					if (tryPlaceWall(queued))
|    | 672|+				if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675| 675| 						{
|    | [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
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673|    |-					{
|    | 673|+					
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687|    |-					}
|    | 687|+					
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
|    | [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
| 670| 670| 				{
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673|    |-					{
|    | 673|+				{
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// 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
| 671| 671| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674|    |-						if (queued)
|    | 674|+					if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							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
| 672| 672| 					if (tryPlaceWall(queued))
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675|    |-						{
|    | 675|+					{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							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
| 673| 673| 					{
| 674| 674| 						if (queued)
| 675| 675| 						{
| 676|    |-							// continue building, just set a new starting position where we left off
|    | 676|+						// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 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| 						if (queued)
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 677|+						placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							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
| 675| 675| 						{
| 676| 676| 							// continue building, just set a new starting position where we left off
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678|    |-							placementSupport.wallEndPosition = undefined;
|    | 678|+						placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
|    | [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
| 677| 677| 							placementSupport.position = placementSupport.wallEndPosition;
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 680|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682| 682| 						else
| 683| 683| 						{
|    | [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
| 678| 678| 							placementSupport.wallEndPosition = undefined;
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681|    |-						}
|    | 681|+					}
| 682| 682| 						else
| 683| 683| 						{
| 684| 684| 							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
| 679| 679| 
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682|    |-						else
|    | 682|+					else
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							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
| 680| 680| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 681| 681| 						}
| 682| 682| 						else
| 683|    |-						{
|    | 683|+					{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 681| 681| 						}
| 682| 682| 						else
| 683| 683| 						{
| 684|    |-							placementSupport.Reset();
|    | 684|+						placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 682| 682| 						else
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685|    |-							inputState = INPUT_NORMAL;
|    | 685|+						inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
| 688| 688| 					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
| 683| 683| 						{
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686|    |-						}
|    | 686|+					}
| 687| 687| 					}
| 688| 688| 					else
| 689| 689| 						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
| 684| 684| 							placementSupport.Reset();
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687|    |-					}
|    | 687|+				}
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
|    | [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
| 685| 685| 							inputState = INPUT_NORMAL;
| 686| 686| 						}
| 687| 687| 					}
| 688|    |-					else
|    | 688|+				else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					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
| 686| 686| 						}
| 687| 687| 					}
| 688| 688| 					else
| 689|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 689|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					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
| 688| 688| 					else
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691|    |-					updateBuildingPlacementPreview();
|    | 691|+				updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693| 693| 				}
| 694| 694| 				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
| 689| 689| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692|    |-					return true;
|    | 692|+				return true;
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
|    | [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
| 690| 690| 
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693|    |-				}
|    | 693|+			}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// 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
| 691| 691| 					updateBuildingPlacementPreview();
| 692| 692| 					return true;
| 693| 693| 				}
| 694|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 694|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					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
| 692| 692| 					return true;
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695|    |-				{
|    | 695|+			{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					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
| 693| 693| 				}
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696|    |-					// reset to normal input mode
|    | 696|+				// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 694| 694| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697|    |-					placementSupport.Reset();
|    | 697|+				placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					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
| 695| 695| 				{
| 696| 696| 					// reset to normal input mode
| 697| 697| 					placementSupport.Reset();
| 698|    |-					updateBuildingPlacementPreview();
|    | 698|+				updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					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
| 697| 697| 					placementSupport.Reset();
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700|    |-					inputState = INPUT_NORMAL;
|    | 700|+				inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702| 702| 				}
| 703| 703| 				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
| 698| 698| 					updateBuildingPlacementPreview();
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701|    |-					return true;
|    | 701|+				return true;
| 702| 702| 				}
| 703| 703| 				break;
| 704| 704| 		}
|    | [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
| 699| 699| 
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702|    |-				}
|    | 702|+			}
| 703| 703| 				break;
| 704| 704| 		}
| 705| 705| 		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
| 700| 700| 					inputState = INPUT_NORMAL;
| 701| 701| 					return true;
| 702| 702| 				}
| 703|    |-				break;
|    | 703|+			break;
| 704| 704| 		}
| 705| 705| 		break;
| 706| 706| 
|    | [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
| 710| 710| 		case "mousemotion":
| 711| 711| 			let maxDragDelta = 16;
| 712| 712| 			if (g_DragStart.distanceTo(ev) >= maxDragDelta)
| 713|    |-			{
|    | 713|+			
| 714| 714| 				// Rotate in the direction of the mouse
| 715| 715| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 716|    |-			}
|    | 716|+			
| 717| 717| 			else
| 718| 718| 			{
| 719| 719| 				// 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
| 715| 715| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 716| 716| 			}
| 717| 717| 			else
| 718|    |-			{
|    | 718|+			
| 719| 719| 				// If the mouse is near the center, snap back to the default orientation
| 720| 720| 				placementSupport.SetDefaultAngle();
| 721|    |-			}
|    | 721|+			
| 722| 722| 
| 723| 723| 			var snapData = Engine.GuiInterfaceCall("GetFoundationSnapData", {
| 724| 724| 				"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
| 741| 741| 				// If shift is down, let the player continue placing another of the same building
| 742| 742| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 743| 743| 				if (tryPlaceBuilding(queued))
| 744|    |-				{
|    | 744|+				
| 745| 745| 					if (queued)
| 746| 746| 						inputState = INPUT_BUILDING_PLACEMENT;
| 747| 747| 					else
| 748| 748| 						inputState = INPUT_NORMAL;
| 749|    |-				}
|    | 749|+				
| 750| 750| 				else
| 751| 751| 				{
| 752| 752| 					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
| 748| 748| 						inputState = INPUT_NORMAL;
| 749| 749| 				}
| 750| 750| 				else
| 751|    |-				{
|    | 751|+				
| 752| 752| 					inputState = INPUT_BUILDING_PLACEMENT;
| 753|    |-				}
|    | 753|+				
| 754| 754| 				return true;
| 755| 755| 			}
| 756| 756| 			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
| 797| 797| 
| 798| 798| 	// Handle the time-warp testing features, restricted to single-player
| 799| 799| 	if (!g_IsNetworked && Engine.GetGUIObjectByName("devTimeWarp").checked)
| 800|    |-	{
|    | 800|+	
| 801| 801| 		if (ev.type == "hotkeydown" && ev.hotkey == "session.timewarp.fastforward")
| 802| 802| 			Engine.SetSimRate(20.0);
| 803| 803| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.fastforward")
| 804| 804| 			Engine.SetSimRate(1.0);
| 805| 805| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.rewind")
| 806| 806| 			Engine.RewindTimeWarp();
| 807|    |-	}
|    | 807|+	
| 808| 808| 
| 809| 809| 	if (ev.hotkey == "session.highlightguarding")
| 810| 810| 	{
|    | [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
| 856| 856| 			break;
| 857| 857| 
| 858| 858| 		case "hotkeydown":
| 859|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 859|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861| 861| 					let now = Date.now();
| 862| 862| 					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
| 857| 857| 
| 858| 858| 		case "hotkeydown":
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860|    |-				{
|    | 860|+			{
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
|    | [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
| 858| 858| 		case "hotkeydown":
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861|    |-					let now = Date.now();
|    | 861|+				let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						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
| 859| 859| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 860| 860| 				{
| 861| 861| 					let now = Date.now();
| 862|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 862|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
|    | [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| 				{
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863|    |-					{
|    | 863|+				{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							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
| 861| 861| 					let now = Date.now();
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 864|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							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
| 862| 862| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865|    |-						{
|    | 865|+					{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
|    | [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
| 863| 863| 					{
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866|    |-							var sptr = ev.hotkey.split(".");
|    | 866|+						var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
|    | [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
| 864| 864| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867|    |-							performGroup("snap", sptr[3]);
|    | 867|+						performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
| 870| 870| 					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
| 865| 865| 						{
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868|    |-						}
|    | 868|+					}
| 869| 869| 					}
| 870| 870| 					else
| 871| 871| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 866| 866| 							var sptr = ev.hotkey.split(".");
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869|    |-					}
|    | 869|+				}
| 870| 870| 					else
| 871| 871| 					{
| 872| 872| 						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
| 867| 867| 							performGroup("snap", sptr[3]);
| 868| 868| 						}
| 869| 869| 					}
| 870|    |-					else
|    | 870|+				else
| 871| 871| 					{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						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
| 868| 868| 						}
| 869| 869| 					}
| 870| 870| 					else
| 871|    |-					{
|    | 871|+				{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 869| 869| 					}
| 870| 870| 					else
| 871| 871| 					{
| 872|    |-						var sptr = ev.hotkey.split(".");
|    | 872|+					var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						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
| 870| 870| 					else
| 871| 871| 					{
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873|    |-						performGroup(sptr[2], sptr[3]);
|    | 873|+					performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						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
| 872| 872| 						var sptr = ev.hotkey.split(".");
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875|    |-						doublePressTimer = now;
|    | 875|+					doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 873| 873| 						performGroup(sptr[2], sptr[3]);
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876|    |-						prevHotkey = ev.hotkey;
|    | 876|+					prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
| 879| 879| 				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
| 874| 874| 
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877|    |-					}
|    | 877|+				}
| 878| 878| 				}
| 879| 879| 				break;
| 880| 880| 		}
|    | [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
| 875| 875| 						doublePressTimer = now;
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878|    |-				}
|    | 878|+			}
| 879| 879| 				break;
| 880| 880| 		}
| 881| 881| 		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
| 876| 876| 						prevHotkey = ev.hotkey;
| 877| 877| 					}
| 878| 878| 				}
| 879|    |-				break;
|    | 879|+			break;
| 880| 880| 		}
| 881| 881| 		break;
| 882| 882| 
|    | [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
|1044|1044| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1045|1045| 
|1046|1046| 			if (placementSupport.mode === "wall")
|1047|    |-			{
|    |1047|+			
|1048|1048| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1049|1049| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1050|1050| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1051|1051| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1052|    |-			}
|    |1052|+			
|1053|1053| 			else
|1054|1054| 			{
|1055|1055| 				// 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
|1318|1318| 	if (templateData.attack &&
|1319|1319| 		templateData.attack.Ranged &&
|1320|1320| 		templateData.attack.Ranged.maxRange)
|1321|    |-	{
|    |1321|+	
|1322|1322| 		// add attack information to display a good tooltip
|1323|1323| 		placementSupport.attack = templateData.attack;
|1324|    |-	}
|    |1324|+	
|1325|1325| }
|1326|1326| 
|1327|1327| // 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
|1402|1402| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1403|1403| 	{
|1404|1404| 		if (inputState == INPUT_BATCHTRAINING)
|1405|    |-		{
|    |1405|+		
|1406|1406| 			// Check if we are training in the same building(s) as the last batch
|1407|1407| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1408|1408| 			// If the order changed, we have a new selection and we should create a new batch.
|1435|1435| 			else if (!decrement)
|1436|1436| 				flushTrainingBatch();
|1437|1437| 				// fall through to create the new batch
|1438|    |-		}
|    |1438|+		
|1439|1439| 
|1440|1440| 		// Don't start a new batch if decrementing or unable to afford it.
|1441|1441| 		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
|1434|1434| 			// Otherwise start a new one
|1435|1435| 			else if (!decrement)
|1436|1436| 				flushTrainingBatch();
|1437|    |-				// fall through to create the new batch
|    |1437|+			// fall through to create the new batch
|1438|1438| 		}
|1439|1439| 
|1440|1440| 		// 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
|1512|1512| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1513|1513| 	{
|1514|1514| 		// Train as many full batches as we can
|1515|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1515|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1516|1516| 		Engine.PostNetworkCommand({
|1517|1517| 			"type": "train",
|1518|1518| 			"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
|1591|1591| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1592|1592| 
|1593|1593| 	// Reset the last idle unit, etc., if the selection type has changed.
|1594|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1594|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1595|1595| 		resetIdleUnit();
|1596|1596| 	lastIdleClasses = classes;
|1597|1597| 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

bb accepted this revision.Apr 14 2019, 9:12 PM

Thx for the patch

This revision is now accepted and ready to land.Apr 14 2019, 9:12 PM
This revision was automatically updated to reflect the committed changes.
Owners added a subscriber: Restricted Owners Package.Apr 14 2019, 9:29 PM