Page MenuHomeWildfire Games

[WIP] Map ping
Needs ReviewPublic

Authored by Imarok on Jan 18 2019, 12:56 PM.

Details

Reviewers
vladislavbelov
Trac Tickets
#3491
Summary

This patch implements map pings by sending the pinged location via chat and show that on the minimap. (I think a simulation command would be the wrong place for that.)
Therefore middle mouse click gui events are implemented.
TODOs:

  • Is there a better way to call the ping function of the minimap from js?
  • The drawing is super hacky! Maybe @vladislavbelov can improve that? I probably can't. I imagine multiple concentric circles per ping.
  • Ping doesn't disappear after a certain time.
  • No sound is played. But still a new sound needed.
  • Use the color of the player that did the ping as ping color?
  • Can't ping on the real map.
  • No ping entity on real map created. But still a ping entity needed
  • No limitation on how often a player can ping. Ping frequency is limited for the sender gui. I guess we might also need a reciever-side limitation.
  • Should the player need to research sharedLos to see a ping of an other player?
  • Add a GUI button with an unassigned hotkey for those that don't have a third mouse button.
  • Existing flare doesn't change color when diplomacycolor is toggled.

Test Plan

Try to find flaws

To ping, click with the middle mouse button inside the minimap. Of course only works in multiplayer.

Diff Detail

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

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Imarok updated this revision to Diff 7360.Jan 18 2019, 1:31 PM

Cosmetic changes (Year numbers, semi)

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
| 582| 582| 	let notificationText =
| 583| 583| 		notification.instructions.reduce((instructions, item) =>
| 584| 584| 			instructions + (typeof item == "string" ? translate(item) : colorizeHotkey(translate(item.text), item.hotkey)),
| 585|    |-			"");
|    | 585|+		"");
| 586| 586| 
| 587| 587| 	Engine.GetGUIObjectByName("tutorialText").caption = g_TutorialMessages.concat(setStringTags(notificationText, g_TutorialNewMessageTags)).join("\n");
| 588| 588| 	g_TutorialMessages.push(notificationText);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
|1090|1090| 
|1091|1091| 	let message = "";
|1092|1092| 	if (notifyPhase == "all")
|1093|    |-	{
|    |1093|+	
|1094|1094| 		if (msg.phaseState == "started")
|1095|1095| 			message = translate("%(player)s is advancing to the %(phaseName)s.");
|1096|1096| 		else if (msg.phaseState == "aborted")
|1097|1097| 			message = translate("The %(phaseName)s of %(player)s has been aborted.");
|1098|    |-	}
|    |1098|+	
|1099|1099| 	if (msg.phaseState == "completed")
|1100|1100| 		message = translate("%(player)s has reached the %(phaseName)s.");
|1101|1101| 

binaries/data/mods/public/gui/session/messages.js
| 641| »   while·(true)
|    | [NORMAL] ESLintBear (no-constant-condition):
|    | Unexpected constant condition.
|    | [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
|1332|1332| 	if (templateData.attack &&
|1333|1333| 		templateData.attack.Ranged &&
|1334|1334| 		templateData.attack.Ranged.maxRange)
|1335|    |-	{
|    |1335|+	
|1336|1336| 		// add attack information to display a good tooltip
|1337|1337| 		placementSupport.attack = templateData.attack;
|1338|    |-	}
|    |1338|+	
|1339|1339| }
|1340|1340| 
|1341|1341| // 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
|1416|1416| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1417|1417| 	{
|1418|1418| 		if (inputState == INPUT_BATCHTRAINING)
|1419|    |-		{
|    |1419|+		
|1420|1420| 			// Check if we are training in the same building(s) as the last batch
|1421|1421| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1422|1422| 			// If the order changed, we have a new selection and we should create a new batch.
|1449|1449| 			else if (!decrement)
|1450|1450| 				flushTrainingBatch();
|1451|1451| 				// fall through to create the new batch
|1452|    |-		}
|    |1452|+		
|1453|1453| 
|1454|1454| 		// Don't start a new batch if decrementing or unable to afford it.
|1455|1455| 		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
|1448|1448| 			// Otherwise start a new one
|1449|1449| 			else if (!decrement)
|1450|1450| 				flushTrainingBatch();
|1451|    |-				// fall through to create the new batch
|    |1451|+			// fall through to create the new batch
|1452|1452| 		}
|1453|1453| 
|1454|1454| 		// 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
|1526|1526| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1527|1527| 	{
|1528|1528| 		// Train as many full batches as we can
|1529|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1529|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1530|1530| 		Engine.PostNetworkCommand({
|1531|1531| 			"type": "train",
|1532|1532| 			"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
|1605|1605| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1606|1606| 
|1607|1607| 	// Reset the last idle unit, etc., if the selection type has changed.
|1608|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1608|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1609|1609| 		resetIdleUnit();
|1610|1610| 	lastIdleClasses = classes;
|1611|1611| 

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
|1248| »   switch(data.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1556| »   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.

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

Link to build: https://jenkins.wildfiregames.com/job/differential/979/

Angen awarded a token.Jan 18 2019, 1:41 PM
elexis added a subscriber: elexis.Jan 18 2019, 4:41 PM

(I think a simulation command would be the wrong place for that.)

That's an important decision. Why is a simulation command wrong and chat right?

Whether it goes through the simulation or not, it sounds like it should end up as a GUI notification, near the other events that the GUI processes that it receives from the gamestate. So that one could also play a funky sound or display something in the 2D menus.
That would be g_NotificationsTypes instead of g_IsChatAddressee and parseChatAddressee (Maybe the others have an opinion too, but IMO parsing player command events that create local simulation entities seems really out of place from a function that is supposed to be about chat messages)
These events usually come from the GUIInterface, i.e. cmpGuiInterface.AddTimeNotification or cmpGuiInterface.PushNotification.
If you do it via chat, it won't be in the replay. If it was in the simulation, one could even do things in the simulation if that event is received (extensibility for future creativity in 0ad and mods. for example units automatically reacting towards that ping, perhaps an actual simulation entity that may influence the simulation other than the VisualActor component and Position, marking that position instead of every player creating the same local one). One could store additional data about the ping.
For example if you want a ping to be displayed for 30 seconds and people rejoin or load a savegame 1 second after such a map ping was sent, some of the players will see it for the next 29 seconds and possibly refer to that point in the chat, while the other player doesn't see that thing.

Finishing to read the code, I see there is no local entity created yet. IMO that would be very relevant, we have a bunch of flag actors, and perhaps we can find something shiny to make it more visible without trying to find the differently colored pixel on that small thing in the bottom left corner.
Should be one or two statements, can check the target marker as an example.

source/gui/CGUI.cpp
216 ↗(On Diff #7360)

break? Also sounds like this would be sensible to split.

Of course only works in multiplayer.

So I guess there is no way not to make it a simulation command then, if the bot should be able to react to it.

Imarok marked an inline comment as done.Jan 18 2019, 5:04 PM
In D1751#70415, @elexis wrote:

(I think a simulation command would be the wrong place for that.)

That's an important decision. Why is a simulation command wrong and chat right?
Whether it goes through the simulation or not, it sounds like it should end up as a GUI notification, near the other events that the GUI processes that it receives from the gamestate. So that one could also play a funky sound or display something in the 2D menus.
That would be g_NotificationsTypes instead of g_IsChatAddressee and parseChatAddressee (Maybe the others have an opinion too, but IMO parsing player command events that create local simulation entities seems really out of place from a function that is supposed to be about chat messages)
These events usually come from the GUIInterface, i.e. cmpGuiInterface.AddTimeNotification or cmpGuiInterface.PushNotification.
If you do it via chat, it won't be in the replay. If it was in the simulation, one could even do things in the simulation if that event is received (extensibility for future creativity in 0ad and mods. for example units automatically reacting towards that ping, perhaps an actual simulation entity that may influence the simulation other than the VisualActor component and Position, marking that position instead of every player creating the same local one). One could store additional data about the ping.
For example if you want a ping to be displayed for 30 seconds and people rejoin or load a savegame 1 second after such a map ping was sent, some of the players will see it for the next 29 seconds and possibly refer to that point in the chat, while the other player doesn't see that thing.

Ok, you convinced me. It'll be a sim command. (Was my first approach, but I thought such only visible thing should be better handled like chat)

Finishing to read the code, I see there is no local entity created yet.

As already stated in the TODOs in the diff description.

IMO that would be very relevant, we have a bunch of flag actors, and perhaps we can find something shiny to make it more visible without trying to find the differently colored pixel on that small thing in the bottom left corner.

The plan is to make more than just a tiny pixel in the minimap. I thought about expanding concentric circles or such.

source/gui/CGUI.cpp
216 ↗(On Diff #7360)

Yeah.

Imarok updated this revision to Diff 7362.Jan 18 2019, 6:44 PM

Use sim command instead of chat. Play sound. (but the wrong) Create ping entity on real map. (but the wrong)

Build failure - The Moirai have given mortals hearts that can endure.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1552| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
| 583| 583| 	let notificationText =
| 584| 584| 		notification.instructions.reduce((instructions, item) =>
| 585| 585| 			instructions + (typeof item == "string" ? translate(item) : colorizeHotkey(translate(item.text), item.hotkey)),
| 586|    |-			"");
|    | 586|+		"");
| 587| 587| 
| 588| 588| 	Engine.GetGUIObjectByName("tutorialText").caption = g_TutorialMessages.concat(setStringTags(notificationText, g_TutorialNewMessageTags)).join("\n");
| 589| 589| 	g_TutorialMessages.push(notificationText);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
|1091|1091| 
|1092|1092| 	let message = "";
|1093|1093| 	if (notifyPhase == "all")
|1094|    |-	{
|    |1094|+	
|1095|1095| 		if (msg.phaseState == "started")
|1096|1096| 			message = translate("%(player)s is advancing to the %(phaseName)s.");
|1097|1097| 		else if (msg.phaseState == "aborted")
|1098|1098| 			message = translate("The %(phaseName)s of %(player)s has been aborted.");
|1099|    |-	}
|    |1099|+	
|1100|1100| 	if (msg.phaseState == "completed")
|1101|1101| 		message = translate("%(player)s has reached the %(phaseName)s.");
|1102|1102| 

binaries/data/mods/public/gui/session/messages.js
| 642| »   while·(true)
|    | [NORMAL] ESLintBear (no-constant-condition):
|    | Unexpected constant condition.
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/unit_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/unit_actions.js
|1474|1474| 		"z": target.z
|1475|1475| 	});
|1476|1476| 
|1477|    |-	//TODO: is there a better way to call the ping function of the minimap?
|    |1477|+	// TODO: is there a better way to call the ping function of the minimap?
|1478|1478| 	let minimap = Engine.GetGUIObjectByName("minimap");
|1479|1479| 	minimap.ping_x = target.x;
|1480|1480| 	minimap.ping_z = target.z;

binaries/data/mods/public/gui/session/unit_actions.js
| 559| »   »   »   switch·(tradingDetails.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
|    | [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 (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
|1269|1269| 		break;
|1270|1270| 	case "mousemiddlerelease":
|1271|1271| 	case "mousemiddledoubleclick":
|1272|    |-			DisplayMapPing(data.target);
|    |1272|+		DisplayMapPing(data.target);
|1273|1273| 			Engine.PostNetworkCommand({
|1274|1274| 				"type": "map-ping",
|1275|1275| 				"target": data.target
|    | [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
|1270|1270| 	case "mousemiddlerelease":
|1271|1271| 	case "mousemiddledoubleclick":
|1272|1272| 			DisplayMapPing(data.target);
|1273|    |-			Engine.PostNetworkCommand({
|    |1273|+		Engine.PostNetworkCommand({
|1274|1274| 				"type": "map-ping",
|1275|1275| 				"target": data.target
|1276|1276| 			});
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/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| 	case "mousemiddledoubleclick":
|1272|1272| 			DisplayMapPing(data.target);
|1273|1273| 			Engine.PostNetworkCommand({
|1274|    |-				"type": "map-ping",
|    |1274|+			"type": "map-ping",
|1275|1275| 				"target": data.target
|1276|1276| 			});
|1277|1277| 		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
|1272|1272| 			DisplayMapPing(data.target);
|1273|1273| 			Engine.PostNetworkCommand({
|1274|1274| 				"type": "map-ping",
|1275|    |-				"target": data.target
|    |1275|+			"target": data.target
|1276|1276| 			});
|1277|1277| 		break;
|1278|1278| 	}
|    | [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
|1273|1273| 			Engine.PostNetworkCommand({
|1274|1274| 				"type": "map-ping",
|1275|1275| 				"target": data.target
|1276|    |-			});
|    |1276|+		});
|1277|1277| 		break;
|1278|1278| 	}
|1279|1279| 	return false;
|    | [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
|1334|1334| 	if (templateData.attack &&
|1335|1335| 		templateData.attack.Ranged &&
|1336|1336| 		templateData.attack.Ranged.maxRange)
|1337|    |-	{
|    |1337|+	
|1338|1338| 		// add attack information to display a good tooltip
|1339|1339| 		placementSupport.attack = templateData.attack;
|1340|    |-	}
|    |1340|+	
|1341|1341| }
|1342|1342| 
|1343|1343| // 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
|1418|1418| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1419|1419| 	{
|1420|1420| 		if (inputState == INPUT_BATCHTRAINING)
|1421|    |-		{
|    |1421|+		
|1422|1422| 			// Check if we are training in the same building(s) as the last batch
|1423|1423| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1424|1424| 			// If the order changed, we have a new selection and we should create a new batch.
|1451|1451| 			else if (!decrement)
|1452|1452| 				flushTrainingBatch();
|1453|1453| 				// fall through to create the new batch
|1454|    |-		}
|    |1454|+		
|1455|1455| 
|1456|1456| 		// Don't start a new batch if decrementing or unable to afford it.
|1457|1457| 		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
|1450|1450| 			// Otherwise start a new one
|1451|1451| 			else if (!decrement)
|1452|1452| 				flushTrainingBatch();
|1453|    |-				// fall through to create the new batch
|    |1453|+			// fall through to create the new batch
|1454|1454| 		}
|1455|1455| 
|1456|1456| 		// 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
|1528|1528| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1529|1529| 	{
|1530|1530| 		// Train as many full batches as we can
|1531|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1531|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1532|1532| 		Engine.PostNetworkCommand({
|1533|1533| 			"type": "train",
|1534|1534| 			"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
|1607|1607| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1608|1608| 
|1609|1609| 	// Reset the last idle unit, etc., if the selection type has changed.
|1610|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1610|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1611|1611| 		resetIdleUnit();
|1612|1612| 	lastIdleClasses = classes;
|1613|1613| 

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
|1248| »   switch(data.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1558| »   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.

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

Link to build: https://jenkins.wildfiregames.com/job/differential/981/

Imarok edited the summary of this revision. (Show Details)Jan 18 2019, 6:47 PM
Imarok edited the summary of this revision. (Show Details)

In CCmpMinimap.cpp:

	// Not serialized (based on renderer timing):
	// TODO: eventually ping state should be serialized and tied into simulation time, but currently lag causes too many problems
	double m_PingEndTime;
		case MT_MinimapPing:
			// This depends on the viewing player, so don't alter the synchronized simulation state
			m_IsPinging = true;

Can find some more information with blame then.

source/gui/CGUI.cpp
216 ↗(On Diff #7360)

(Also looks like I read this hunk once or twice somewhere else)

In D1751#70444, @elexis wrote:

In CCmpMinimap.cpp:

	// Not serialized (based on renderer timing):
	// TODO: eventually ping state should be serialized and tied into simulation time, but currently lag causes too many problems
	double m_PingEndTime;
		case MT_MinimapPing:
			// This depends on the viewing player, so don't alter the synchronized simulation state
			m_IsPinging = true;

Can find some more information with blame then.

That is the minimap attack notification. (white blinking unit)

Imarok marked an inline comment as done.Jan 18 2019, 7:35 PM
Imarok added inline comments.
source/gui/CGUI.cpp
216 ↗(On Diff #7360)

You are looking at the old diff ;P

Imarok edited the summary of this revision. (Show Details)Jan 18 2019, 8:59 PM
Imarok updated this revision to Diff 7363.Jan 18 2019, 8:59 PM
Imarok edited the summary of this revision. (Show Details)

Support for multiple pings. Use player color for pings. Ping is shown as increasing square. (hope someone will code something more beautiful) Limit each player to 1 ping per second.

Build failure - The Moirai have given mortals hearts that can endure.

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
| 583| 583| 	let notificationText =
| 584| 584| 		notification.instructions.reduce((instructions, item) =>
| 585| 585| 			instructions + (typeof item == "string" ? translate(item) : colorizeHotkey(translate(item.text), item.hotkey)),
| 586|    |-			"");
|    | 586|+		"");
| 587| 587| 
| 588| 588| 	Engine.GetGUIObjectByName("tutorialText").caption = g_TutorialMessages.concat(setStringTags(notificationText, g_TutorialNewMessageTags)).join("\n");
| 589| 589| 	g_TutorialMessages.push(notificationText);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
|1091|1091| 
|1092|1092| 	let message = "";
|1093|1093| 	if (notifyPhase == "all")
|1094|    |-	{
|    |1094|+	
|1095|1095| 		if (msg.phaseState == "started")
|1096|1096| 			message = translate("%(player)s is advancing to the %(phaseName)s.");
|1097|1097| 		else if (msg.phaseState == "aborted")
|1098|1098| 			message = translate("The %(phaseName)s of %(player)s has been aborted.");
|1099|    |-	}
|    |1099|+	
|1100|1100| 	if (msg.phaseState == "completed")
|1101|1101| 		message = translate("%(player)s has reached the %(phaseName)s.");
|1102|1102| 

binaries/data/mods/public/gui/session/messages.js
| 642| »   while·(true)
|    | [NORMAL] ESLintBear (no-constant-condition):
|    | Unexpected constant condition.

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1552| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/unit_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/unit_actions.js
|1474|1474| 		"z": target.z
|1475|1475| 	});
|1476|1476| 
|1477|    |-	//TODO: is there a better way to call the ping function of the minimap?
|    |1477|+	// TODO: is there a better way to call the ping function of the minimap?
|1478|1478| 	let minimap = Engine.GetGUIObjectByName("minimap");
|1479|1479| 	minimap.ping_x = target.x;
|1480|1480| 	minimap.ping_z = target.z;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Link to build: https://jenkins.wildfiregames.com/job/differential/982/

Imarok edited the summary of this revision. (Show Details)Jan 18 2019, 9:50 PM

I didn't take a look at the JS code.

source/gui/MiniMap.cpp
196

Why not use the script interface instead of XML params?

253

Actually the float cast isn't not needed here, because you already have the 1.0f before.

351

It's not so bad copy-pasted, because the original code is used for a long time :)

352

I think it's better to use float instead of int for the step, because of more smooth animation. Since you don't need such precision on edges, but only attention to the center of the animation.

356

Indent.

681

With my comments above it'd look like:

while (!m_MapPings.empty() && m_MapPings.front().IsOver())
	m_MapPings.pop_front();

for (const MapPingObj& obj : m_MapPings)
	DrawPing(unitMatrix, obj);
source/gui/MiniMap.h
24

Don't use #define for new types. Use typedef or using. Also I think the first.first is not obvious for a reader in this case.

76

std::deque here, because the time sequence in monotonic. Also it's not so fragmented as the std::list.

109

const CMatrix3D& transform, because of 16 floats. Also I'd prefer to pass const MapPingObj& instead of multiple params.

111

CPos GetMapCoordinates(float x, float z) const.

source/gui/MiniMap.cpp
175

I suppose the CMiniMap:: prefix is not needed here, because it's not the derived or the global function.

I think we should restrict the number of pings, because I'm sure there will be many spammer on servers.

elexis added inline comments.Jan 18 2019, 11:14 PM
binaries/data/mods/public/gui/session/input.js
1226

one scope { } per case and let, so that the variable of one case can't be used in the other case, and one is free to use the same variable name in each case without any worries

binaries/data/mods/public/gui/session/messages.js
485

(Should be taken care of that this can't cause any OOS, or asynchronicities without hash-mismatch. For example if the game is paused or lagging the local player might see it already but the other clients wouldn't. Likely not a problem as the commands aren't delayed anyhow.)

binaries/data/mods/public/gui/session/unit_actions.js
1469

as far as I know we used lowercase (could be corrected above too), but all of the JS GUI should become OOP anyway

1477

Alternatives include JSInterface_*.cpp, or calling calling C++ code directly via GUIInterface.

But calling the minimap object directly doesn't sound too bad.
The only thing that looks ugly to me is that the arguments are passed one by one (concurrency problem).
Like the JS GUI setting X but didn't set Z yet when the minimap starts to draw.
Maybe that's why the "ping" variable is here, to signal that the copying is finished.

That would be better cleaned if passing a JS object { "position": new Vector2D(x, y), "color": ...", ... } to C++.
Only need to implement the conversion from JS Object to C++ value in one of these *ScriptConversion*.cpp files (FromJSVal, ToJSVal).

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

-1 tab, let or inline

Can't ping on the real map.

There should probably a minimap button in one of the corners that when clicked, changes the input.js state thing, the cursor and then when leftclicked on the minimap or realworld map, the command could be sent (similar to the repair mode).

Should the player need to research sharedLos to see a ping of an other player?

See and send. Probably I wouldn't oppose. Can also consider not showing attack notifications in the shroud of darkness instead of checking for the tech. But doesn't seem like a legbreaker.

vladislavbelov requested changes to this revision.Feb 16 2019, 6:21 PM

Currently few of my comments should be fixed anyway, so I add a "Request changes". But also I want to discuss about a method to pass the ping event to the C++.

This revision now requires changes to proceed.Feb 16 2019, 6:21 PM
Imarok edited the summary of this revision. (Show Details)Apr 25 2019, 7:29 PM
Imarok edited the summary of this revision. (Show Details)Apr 26 2019, 1:16 AM
Imarok edited the summary of this revision. (Show Details)Apr 26 2019, 2:01 AM
Imarok updated this revision to Diff 7864.Apr 26 2019, 2:03 AM
Imarok marked 14 inline comments as done.

Rebase and apply the proposed changes

I think we should restrict the number of pings, because I'm sure there will be many spammer on servers.

Yeah, it's planned. (See the TODO in the description of this diff.)

binaries/data/mods/public/gui/session/messages.js
485

That's all purely gui, so no simulation involved. (Besides the action marker) So I don't see a OOS posssibility.

binaries/data/mods/public/gui/session/unit_actions.js
1477

Maybe that's why the "ping" variable is here, to signal that the copying is finished.

Yep, that's why.
Best solution would be if we could call a function of this object. Not sure if that's possible.
The current one was just meant as a provisional solution until someone or I find a better.

source/gui/MiniMap.cpp
175

True.

196

I'd like to do that, but I found no way to call a function of the minimap without hardcoding a specific instance of the minimap.

Build failure - The Moirai have given mortals hearts that can endure.

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
| 583| 583| 	let notificationText =
| 584| 584| 		notification.instructions.reduce((instructions, item) =>
| 585| 585| 			instructions + (typeof item == "string" ? translate(item) : colorizeHotkey(translate(item.text), item.hotkey)),
| 586|    |-			"");
|    | 586|+		"");
| 587| 587| 
| 588| 588| 	Engine.GetGUIObjectByName("tutorialText").caption = g_TutorialMessages.concat(setStringTags(notificationText, g_TutorialNewMessageTags)).join("\n");
| 589| 589| 	g_TutorialMessages.push(notificationText);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
|1091|1091| 
|1092|1092| 	let message = "";
|1093|1093| 	if (notifyPhase == "all")
|1094|    |-	{
|    |1094|+	
|1095|1095| 		if (msg.phaseState == "started")
|1096|1096| 			message = translate("%(player)s is advancing to the %(phaseName)s.");
|1097|1097| 		else if (msg.phaseState == "aborted")
|1098|1098| 			message = translate("The %(phaseName)s of %(player)s has been aborted.");
|1099|    |-	}
|    |1099|+	
|1100|1100| 	if (msg.phaseState == "completed")
|1101|1101| 		message = translate("%(player)s has reached the %(phaseName)s.");
|1102|1102| 
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/unit_actions.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/unit_actions.js
|1474|1474| 		"z": target.z
|1475|1475| 	});
|1476|1476| 
|1477|    |-	//TODO: is there a better way to call the ping function of the minimap?
|    |1477|+	// TODO: is there a better way to call the ping function of the minimap?
|1478|1478| 	let minimap = Engine.GetGUIObjectByName("minimap");
|1479|1479| 	minimap.ping_x = target.x;
|1480|1480| 	minimap.ping_z = target.z;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 940| »   »   »   var·ent·=·Engine.PickEntityAtPoint(ev.x,·ev.y);
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 330| 330| 			{
| 331| 331| 				var list = queue.GetEntitiesList();
| 332| 332| 				if (list.indexOf(cmd.template) === -1 && cmd.promoted)
| 333|    |-				{
|    | 333|+				
| 334| 334| 					for (var promoted of cmd.promoted)
| 335| 335| 					{
| 336| 336| 						if (list.indexOf(promoted) === -1)
| 338| 338| 						cmd.template = promoted;
| 339| 339| 						break;
| 340| 340| 					}
| 341|    |-				}
|    | 341|+				
| 342| 342| 			}
| 343| 343| 			if (queue && queue.GetEntitiesList().indexOf(cmd.template) != -1)
| 344| 344| 				if ("metadata" in cmd)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 537| 537| 			if (cmpGarrisonHolder)
| 538| 538| 			{
| 539| 539| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 540|    |-				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 541|    |-				    && player != +cmd.owner)
|    | 540|+				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits &&
|    | 541|+				    player != +cmd.owner)
| 542| 542| 						continue;
| 543| 543| 
| 544| 544| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 539| 539| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 540| 540| 				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 541| 541| 				    && player != +cmd.owner)
| 542|    |-						continue;
|    | 542|+					continue;
| 543| 543| 
| 544| 544| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
| 545| 545| 					notifyUnloadFailure(player, garrisonHolder);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 959| 959| 		{
| 960| 960| 			var count = 0;
| 961| 961| 			for (let j = 0; j < length - 1; ++j)
| 962|    |-			{
|    | 962|+			
| 963| 963| 				if ((waterPoints[(i + j) % length] + 1) % numPoints == waterPoints[(i + j + 1) % length])
| 964| 964| 					++count;
| 965| 965| 				else
| 966| 966| 					break;
| 967|    |-			}
|    | 967|+			
| 968| 968| 			consec[i] = count;
| 969| 969| 		}
| 970| 970| 		var start = 0;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-in'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 970| 970| 		var start = 0;
| 971| 971| 		var count = 0;
| 972| 972| 		for (var c in consec)
| 973|    |-		{
|    | 973|+		
| 974| 974| 			if (consec[c] > count)
| 975| 975| 			{
| 976| 976| 				start = c;
| 977| 977| 				count = consec[c];
| 978| 978| 			}
| 979|    |-		}
|    | 979|+		
| 980| 980| 
| 981| 981| 		// If we've found a shoreline, stop searching
| 982| 982| 		if (count != numPoints-1)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'metadata'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1153|1153| 
|1154|1154| 	// send Metadata info if any
|1155|1155| 	if (cmd.metadata)
|1156|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1156|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata": cmd.metadata, "owner" : player } );
|1157|1157| 
|1158|1158| 	// Tell the units to start building this new entity
|1159|1159| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'owner'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1153|1153| 
|1154|1154| 	// send Metadata info if any
|1155|1155| 	if (cmd.metadata)
|1156|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1156|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner": player } );
|1157|1157| 
|1158|1158| 	// Tell the units to start building this new entity
|1159|1159| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1153|1153| 
|1154|1154| 	// send Metadata info if any
|1155|1155| 	if (cmd.metadata)
|1156|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1156|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player });
|1157|1157| 
|1158|1158| 	// Tell the units to start building this new entity
|1159|1159| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1157|1157| 
|1158|1158| 	// Tell the units to start building this new entity
|1159|1159| 	if (cmd.autorepair)
|1160|    |-	{
|    |1160|+	
|1161|1161| 		ProcessCommand(player, {
|1162|1162| 			"type": "repair",
|1163|1163| 			"entities": entities,
|1165|1165| 			"autocontinue": cmd.autocontinue,
|1166|1166| 			"queued": cmd.queued
|1167|1167| 		});
|1168|    |-	}
|    |1168|+	
|1169|1169| 
|1170|1170| 	return ent;
|1171|1171| }
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1261|1261| 		}
|1262|1262| 
|1263|1263| 		lastTowerControlGroup = cmpSnappedStartObstruction.GetControlGroup();
|1264|    |-		//warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|    |1264|+		// warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|1265|1265| 	}
|1266|1266| 
|1267|1267| 	var i = 0;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1278|1278| 		// 'lastTowerControlGroup' must always be defined and valid here, except if we're at the first piece and we didn't do
|1279|1279| 		// start position snapping (implying that the first entity we build must be a tower)
|1280|1280| 		if (lastTowerControlGroup === null || lastTowerControlGroup == INVALID_ENTITY)
|1281|    |-		{
|    |1281|+		
|1282|1282| 			if (!(i == 0 && piece.template == cmd.wallSet.templates.tower && !cmd.startSnappedEntity))
|1283|1283| 			{
|1284|1284|     			error("[TryConstructWall] Expected last tower control group to be available, none found (1st pass, iteration " + i + ")");
|1285|1285|     			break;
|1286|1286| 			}
|1287|    |-		}
|    |1287|+		
|1288|1288| 
|1289|1289| 		var constructPieceCmd = {
|1290|1290| 			"type": "construct",
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1325|1325| 
|1326|1326| 				if (i > 0)
|1327|1327| 				{
|1328|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1328|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1329|1329| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1330|1330| 					// TODO: ensure that cmpPreviousObstruction exists
|1331|1331| 					// TODO: ensure that the previous obstruction does not yet have a secondary control group set
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1383|1383| 		}
|1384|1384| 
|1385|1385| 		if (piece.template == cmd.wallSet.templates.tower)
|1386|    |-		{
|    |1386|+		
|1387|1387| 			// encountered a tower entity, update the last tower control group
|1388|1388| 			lastTowerControlGroup = cmpPieceObstruction.GetControlGroup();
|1389|    |-		}
|    |1389|+		
|1390|1390| 		else
|1391|1391| 		{
|1392|1392| 			// Encountered a non-tower entity, update its secondary control group to 'lastTowerControlGroup'.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1397|1397| 			if (existingSecondaryControlGroup == INVALID_ENTITY)
|1398|1398| 			{
|1399|1399| 				if (lastTowerControlGroup != null && lastTowerControlGroup != INVALID_ENTITY)
|1400|    |-				{
|    |1400|+				
|1401|1401| 					cmpPieceObstruction.SetControlGroup2(lastTowerControlGroup);
|1402|    |-				}
|    |1402|+				
|1403|1403| 			}
|1404|1404| 			else if (existingSecondaryControlGroup != lastTowerControlGroup)
|1405|1405| 			{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1472|1472| 	}
|1473|1473| 
|1474|1474| 	if (formedEnts.length == 0)
|1475|    |-	{
|    |1475|+	
|1476|1476| 		// No units support the formation - return all the others
|1477|1477| 		return nonformedUnitAIs;
|1478|    |-	}
|    |1478|+	
|1479|1479| 
|1480|1480| 	// Find what formations the formationable selected entities are currently in
|1481|1481| 	var formation = ExtractFormations(formedEnts);
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1488|1488| 		// Check that all its members are selected
|1489|1489| 		var fid = formationIds[0];
|1490|1490| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1491|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1492|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1491|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1492|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1493|1493| 		{
|1494|1494| 			cmpFormation.DeleteTwinFormations();
|1495|1495| 			// The whole formation was selected, so reuse its controller for this command
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1520|1520| 					{
|1521|1521| 						var template = cmpUnitAI.GetFormationTemplate();
|1522|1522| 						if (lastFormationTemplate === undefined)
|1523|    |-						{
|    |1523|+						
|1524|1524| 							lastFormationTemplate = template;
|1525|    |-						}
|    |1525|+						
|1526|1526| 						else if (lastFormationTemplate != template)
|1527|1527| 						{
|1528|1528| 							lastFormationTemplate = undefined;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1596|1596| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1597|1597| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1598|1598| 				if (matrix[i][j] < distSq)
|1599|    |-					closeClusters = [i,j];
|    |1599|+					closeClusters = [i, j];
|1600|1600| 
|1601|1601| 		// if no more close clusters found, just return all found clusters so far
|1602|1602| 		if (!closeClusters)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1618|1618| 		}
|1619|1619| 		// remove the rows and columns in the matrix for the merged clusters,
|1620|1620| 		// and the clusters themselves from the cluster list
|1621|    |-		clusters.splice(closeClusters[0],1);
|    |1621|+		clusters.splice(closeClusters[0], 1);
|1622|1622| 		clusters.splice(closeClusters[1],1);
|1623|1623| 		matrix.splice(closeClusters[0],1);
|1624|1624| 		matrix.splice(closeClusters[1],1);
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1619|1619| 		// remove the rows and columns in the matrix for the merged clusters,
|1620|1620| 		// and the clusters themselves from the cluster list
|1621|1621| 		clusters.splice(closeClusters[0],1);
|1622|    |-		clusters.splice(closeClusters[1],1);
|    |1622|+		clusters.splice(closeClusters[1], 1);
|1623|1623| 		matrix.splice(closeClusters[0],1);
|1624|1624| 		matrix.splice(closeClusters[1],1);
|1625|1625| 		for (let i = 0; i < matrix.length; ++i)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1620|1620| 		// and the clusters themselves from the cluster list
|1621|1621| 		clusters.splice(closeClusters[0],1);
|1622|1622| 		clusters.splice(closeClusters[1],1);
|1623|    |-		matrix.splice(closeClusters[0],1);
|    |1623|+		matrix.splice(closeClusters[0], 1);
|1624|1624| 		matrix.splice(closeClusters[1],1);
|1625|1625| 		for (let i = 0; i < matrix.length; ++i)
|1626|1626| 		{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1621|1621| 		clusters.splice(closeClusters[0],1);
|1622|1622| 		clusters.splice(closeClusters[1],1);
|1623|1623| 		matrix.splice(closeClusters[0],1);
|1624|    |-		matrix.splice(closeClusters[1],1);
|    |1624|+		matrix.splice(closeClusters[1], 1);
|1625|1625| 		for (let i = 0; i < matrix.length; ++i)
|1626|1626| 		{
|1627|1627| 			if (matrix[i].length > closeClusters[0])
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1625|1625| 		for (let i = 0; i < matrix.length; ++i)
|1626|1626| 		{
|1627|1627| 			if (matrix[i].length > closeClusters[0])
|1628|    |-				matrix[i].splice(closeClusters[0],1);
|    |1628|+				matrix[i].splice(closeClusters[0], 1);
|1629|1629| 			if (matrix[i].length > closeClusters[1])
|1630|1630| 				matrix[i].splice(closeClusters[1],1);
|1631|1631| 		}
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1627|1627| 			if (matrix[i].length > closeClusters[0])
|1628|1628| 				matrix[i].splice(closeClusters[0],1);
|1629|1629| 			if (matrix[i].length > closeClusters[1])
|1630|    |-				matrix[i].splice(closeClusters[1],1);
|    |1630|+				matrix[i].splice(closeClusters[1], 1);
|1631|1631| 		}
|1632|1632| 		// add a new row of distances to the matrix and the new cluster
|1633|1633| 		clusters.push(newCluster);

binaries/data/mods/public/simulation/helpers/Commands.js
| 789| »   »   let·ent·=·pickRandom(cmpRangeManager.GetEntitiesByPlayer(cmd.player).filter(ent·=>·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.

binaries/data/mods/public/simulation/helpers/Commands.js
|1284| ····»   »   »   error("[TryConstructWall]·Expected·last·tower·control·group·to·be·available,·none·found·(1st·pass,·iteration·"·+·i·+·")");
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/simulation/helpers/Commands.js
|1285| ····»   »   »   break;
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/simulation/helpers/Commands.js
|1515| »   »   »   »   var·lastFormationTemplate·=·undefined;
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'lastFormationTemplate' to undefined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1594| »   »   var·closeClusters·=·undefined;
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'closeClusters' to undefined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1611| »   »   for·(let·i·=·0;·i·<·clusters.length;·++i)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'i' is already declared in the upper scope.

binaries/data/mods/public/simulation/helpers/Commands.js
|1625| »   »   for·(let·i·=·0;·i·<·matrix.length;·++i)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'i' is already declared in the upper scope.

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1551| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
Executing section cli...

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

Perhaps draw vs. display can be made consistent.

There is a conflicting name MT_MinimapPing in components/CCmpMinimap.cpp.
There should only be one minimap ping, so one of the two should be renamed.

So in the current revision it works this way:

  1. GUI -> send simulation command and displayMapPing locally
  2. Commands.js -> record to replay and broadcast GUI message
  3. messages.js -> displayMapPing -> GetGUIObjectByName("minimap").ping = true and GUIInterface drawTargetMarker;

The minimap C++ GUI object receives the simulation data, entities from the simulation, this could also be considered for these pings.
Then one doesn't abuse the setting system anymore as an event, and one doesn't have to hardcode the minimap GUI object name(s).
Storing in the simulation sounds a lot like storing in the GUIInterface, since the events are not sent against an entity, nor really against the terrain, maybe there is some other component I'm overlooking, or perhaps one can consider if there is enough use for a new component.

I mentioned GetGUIObjectByName("minimap").ping(position, template); is also possible by editing the JSInterface_IGUIObject.cpp function (this file should be split into one file per GUI Object type, since the new function will be added to every GUI Object type).
But not having to hardcode the GUI objects seems preferable, then people can add a second minimap if they'd like to, or rename it.

The other proposed GUI settings of Minimap are also a hack because their values serve as function arguments rather than properties of the minimap as well, so that should really be fixed in one of these two ways.
Storing in the GUIInterface and pulling it from there seems more advantageous

Perhaps one can also look at RangeOverlayManager.js storing the attack/aura/heal ranges and pushing them to CCmpRangeOverlayRenderer.cpp as an alternative example.

binaries/data/mods/public/gui/session/unit_actions.js
1480

Should be minimap.ping_position = target
The Vector2D <-> JS Value conversion is already implemented.
(The Vector3D <-< JSValue one isn't but, you could use the To2D function if this is a 3D one.)

source/gui/MiniMap.cpp
196

A GUI Setting is intended to be a value that can be read from and written to, should not represent an event, so this is definitely a workaround / hack.

287

The eval is a hack, JS::RootedObject data(cx, JS_NewPlainObject(cx));

352

Can still move the copied part to a helper function with the color as an argument

589

GUI Minimap pulls rendering data from the simulation here

621

Minimap ping code here confusing the reader

681

3 -> constant?

source/gui/MiniMap.h
76

The events could have different durations, then items in the middle could be deleted?

elexis added inline comments.Apr 26 2019, 11:39 AM
binaries/data/mods/public/gui/session/messages.js
485

OOS could happen if displayMapPing changes serialized data, depends on how it will be implemented.
OOS is one of the two cases I mentioned:

For example if the game is paused or lagging the local player might see it already but the other clients wouldn't.

Imagine if the game is paused and a player tries communicating via the markers and assumes that his allies see these commands immediately, because he himself sees these immediately.

This could be solved by displaying one actor when the command was started and the other when the marker was finished.

I guess that can be neglected, since one currently is not supposed to be able to send commands during pauses. But that might actually change again in the future.

Anyhow, not so important edge case and the affected player might just learn that he can't use these to communicate during pauses.

In D1751#76309, @elexis wrote:

Perhaps draw vs. display can be made consistent.

Yeah, sure.

There is a conflicting name MT_MinimapPing in components/CCmpMinimap.cpp.
There should only be one minimap ping, so one of the two should be renamed.

I know. I planned to rename the MT_MinimapPing to MT_MinimapBlink

So in the current revision it works this way:

  1. GUI -> send simulation command and displayMapPing locally
  2. Commands.js -> record to replay and broadcast GUI message
  3. messages.js -> displayMapPing -> GetGUIObjectByName("minimap").ping = true and GUIInterface drawTargetMarker;

yes

I mentioned GetGUIObjectByName("minimap").ping(position, template); is also possible by editing the JSInterface_IGUIObject.cpp function (this file should be split into one file per GUI Object type, since the new function will be added to every GUI Object type).
But not having to hardcode the GUI objects seems preferable, then people can add a second minimap if they'd like to, or rename it.

That was what I looked for. Thank you ;)
I'd prefer to take that way. Yeah it's bad that it will be defined for all GUI objects, but I don't see this as a blocker. We can still use two minimaps as long as they both use the MiniMap class.
I'd prefer to not use the simulation as imho minimap pings shouldn't be in the simualation. They are a purely gui thing, just as chat.

Imarok added inline comments.Apr 28 2019, 5:23 PM
source/gui/MiniMap.cpp
287

Hmm, true. But we're using this hack quite often ;)
(43 times to be concrete)

681

This is still ugly wip draw code. ;P

I'd prefer to not use the simulation as imho minimap pings shouldn't be in the simualation. They are a purely gui thing, just as chat.

The question is which features would be useful to have, rather than only ending after the first step.
For example one conceivable use case would be setting an attack request point somewhere on the map for the next 30 seconds to 3 minutes.
If someone rejoins and if it's stored in the simulation, then it will be visible to the rejoiner.
Can/should also check what feature plans and ideas were expressed in the tickets, commit history, design documents, forum threads, IRC logs.

elexis added a comment.EditedMay 12 2019, 11:33 AM

Yeah it's bad that it will be defined for all GUI objects, but I don't see this as a blocker.

rP22134, adds only a little bit of mess, not a blocker, someone else can fix it afterwards
D1781, adds only a little bit of mess, not a blocker, someone else can fix it afterwards
D1751, adds only a little bit of mess, not a blocker, someone else can fix it afterwards
Who will fix it?
Why should he fix it?
When will he fix it?
Why should the code be introduced with a known defect?
Why do I get accused of wanting to stop people from progressing if I point out anti-patterns that only add a little defect for now that can be fixed in the future by someone else?
Created #5442.

Just for fuelling the fire:

Who will fix it?
Why should he fix it?
When will he fix it?

Whoever gets around to doing that of course ;) We all love a good series of cleanup patches.


It does appear like there is a structural change opportunity here to clean our GUI code overall, so that's something we should look at in anticipation of this.

In D1751#77680, @elexis wrote:

Yeah it's bad that it will be defined for all GUI objects, but I don't see this as a blocker.

rP22134, adds only a little bit of mess, not a blocker, someone else can fix it afterwards
D1781, adds only a little bit of mess, not a blocker, someone else can fix it afterwards
D1751, adds only a little bit of mess, not a blocker, someone else can fix it afterwards
Who will fix it?
Why should he fix it?
When will he fix it?
Why should the code be introduced with a known defect?
Why do I get accused of wanting to stop people from progressing if I point out anti-patterns that only add a little defect for now that can be fixed in the future by someone else?
Created #5442.

Sure but I thought that is currently the only possible way of doing that?

In D1751#77994, @Imarok wrote:

Sure but I thought that is currently the only possible way of doing that?

Is it?

In D1751#77632, @elexis wrote:

I'd prefer to not use the simulation as imho minimap pings shouldn't be in the simualation. They are a purely gui thing, just as chat.

Seems like I was arguing with myself. I already do the pings as simulation commands. xD Sorry for my confusion.

The question is which features would be useful to have, rather than only ending after the first step.
For example one conceivable use case would be setting an attack request point somewhere on the map for the next 30 seconds to 3 minutes.

Could be an idea. But I think a variable duration overcomplicates the thing. I mean you also have to provide a gui for that. (But of course it can be added later)

Can/should also check what feature plans and ideas were expressed in the tickets, commit history, design documents, forum threads, IRC logs.

Only feature in the ticket that is currently not on my list are different types of pings. That can be easily added later.

In D1751#78011, @elexis wrote:
In D1751#77994, @Imarok wrote:

Sure but I thought that is currently the only possible way of doing that?

Is it?

Feel free to suggest a better way.

In D1751#78023, @Imarok wrote:
In D1751#77632, @elexis wrote:

I'd prefer to not use the simulation as imho minimap pings shouldn't be in the simualation. They are a purely gui thing, just as chat.

Seems like I was arguing with myself. I already do the pings as simulation commands. xD

I didn't speak about simulation commands but serializing the events.
I.e. if it should be displayed for 30 seconds and someone rejoins a second after it was initiated, then his unrejoined allies will see it for 29 seconds and the rejoiner ally will not see the signal.

The question is which features would be useful to have, rather than only ending after the first step.
For example one conceivable use case would be setting an attack request point somewhere on the map for the next 30 seconds to 3 minutes.

Could be an idea. But I think a variable duration overcomplicates the thing. I mean you also have to provide a gui for that. (But of course it can be added later)

I didn't say player defined length.
The problem still is that a developer defined 30 second map ping is not visible for 29 seconds after the rejoin started one second after the command was sent.

Can/should also check what feature plans and ideas were expressed in the tickets, commit history, design documents, forum threads, IRC logs.

Only feature in the ticket that is currently not on my list are different types of pings. That can be easily added later.

That is the trac ticket(s?), and what about the commit history, design documents, forum threads, IRC logs?
In the code there are several TODOs and unfinished implementations that may be a lead.
Ticket was created May 13th 2006, written by Acumen / Stuart, so I suspect there is some forum discussion that might be located using these two constraints, the keyword, the trac URL.
I didn't find anything quickly in the meetinglogs from that time downloaded on the staff lounge, but it would be locateable if we have forum threads.
The list is also missing imagination of the author and possibly anyone else who has some imagination.

I'm wondering about the branding, it doesn't have anything to do with the minimap, other than the minimap being one way to send the signal. It should equally be possible to iniiate the signal without the minimap.
It does ping, but it should do more than pinging, it's a signal, it can inform players where to attack, where to establish a trade route, where to build a wall etc, and that could be displayed using different visual actors.

Another possible utilization of the simulation is that the simulation components might actually process this thing. I they are serialized anyhow, they would also be ready to use.
Imagine 'map-pings' in the realworld, they are flares or fires and they can also influence the actors and the environment. So it's not trivial to decide.
(And map-pings are not comparable to chat, because they already are entities in the simulation (whether you serialize them or not). More comparable to rallypoints.)

In D1751#78011, @elexis wrote:
In D1751#77994, @Imarok wrote:

Sure but I thought that is currently the only possible way of doing that?

Is it?

Feel free to suggest a better way.

See above:

this file should be split into one file per GUI Object type, since the new function will be added to every GUI Object type)
Created #5442.

Study of JSInterface_IGUIObject.cpp is necessary whether you add the proposed function only to the minimap object type or all gui object types.

Sorry for my confusion.

Sorry, I spent 60 minutes on this reply (don't ask me why but that's what the clock says), which are 55 too many.
I didn't post this and the previous replies to become involved in this feature but to make you a more self-sustained developer that finds his way around without me.

elexis added inline comments.Aug 31 2019, 12:54 PM
source/gui/MiniMap.cpp
76

(AddSetting<bool> etc following rP22604)

196

Settings should be used for settings, functions for functios.

Have a look at https://trac.wildfiregames.com/browser/ps/trunk/source/gui/scripting/JSInterface_IGUITextOwner.cpp?rev=22596 from rP22596 and how JSI_IGUITextOwner::RegisterScriptFunctions is called.
So it could easily use JSInterface_MiniMap.cpp that provides a ping(Vector2D) or similar.

(If this was a setting, then it would have been cleaner to implement a ScriptInterface::FromJSVal<MapPingObj> for your existing MapPingObj with the content below, also registering the setting with AddSetting<MapPingObj> if it was a setting)

287

ScriptInterface::CreateObject(target, "x", x, "z", z) following rP22528.

source/gui/MiniMap.h
107

(Didn't check, perhaps this can become a const function)