Page MenuHomeWildfire Games

[WIP] Map ping
Needs ReviewPublic

Authored by Imarok on Jan 18 2019, 12:56 PM.
Tags
None
Subscribers
Restricted Owners Package, badosu, Stan and 5 others
Tokens
"Pterodactyl" token, awarded by Polakrity."Love" token, awarded by Angen.

Details

Reviewers
vladislavbelov
Trac Tickets
#3491
Summary

This patch implements map pings by sending the pinged location via simulation command and show that on the minimap.
To trigger a ping you can either use a hotkey that modifies your click action or use the minimap button to start a preselected action and then click on somewhere on the terrain or on the minimap.
The ping indicator on the minimap will have the displaycolor of the player that pinged. (I account for toggling of diplomacycolors, but only in the moment a new ping is created. So a ping doesn't change it's color in the midst of its life.)

TODO (on my side):

  • I draw circles by drawing a scaled circle texture. I should try using a fragment shader for a prettier result. (Maybe even multiple concentric circles per ping?)
  • Limit the number of flares on the receiver side?
  • Lower the texture size to 256x156 pixels as soon as the general look is accepted.
  • Target markers should be also colored in playercolor.

TODO (probably for someone else):

  • highlighted version of the flare button
  • Target Marker for flaring
  • Flaring sound

current rendering:


First try with one texture:

Old version with rectangles:

Test Plan

Try to find flaws

To ping, use the hotkey or the gui button. Then click on the map or the minimap.

Diff Detail

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Imarok added inline comments.Apr 26 2019, 2:03 AM
binaries/data/mods/public/gui/session/messages.js
277

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
1583

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 ↗(On Diff #7363)

True.

195 ↗(On Diff #7363)

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
1586

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
195 ↗(On Diff #7363)

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.

350 ↗(On Diff #7363)

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

678 ↗(On Diff #7363)

3 -> constant?

287 ↗(On Diff #7864)

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

589 ↗(On Diff #7864)

GUI Minimap pulls rendering data from the simulation here

621 ↗(On Diff #7864)

Minimap ping code here confusing the reader

source/gui/MiniMap.h
69 ↗(On Diff #7363)

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
277

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
678 ↗(On Diff #7363)

This is still ugly wip draw code. ;P

287 ↗(On Diff #7864)

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

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
195 ↗(On Diff #7363)

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)

76 ↗(On Diff #7864)

(AddSetting<bool> etc following rP22604)

287 ↗(On Diff #7864)

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

source/gui/MiniMap.h
107 ↗(On Diff #7864)

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

Stan updated this revision to Diff 11771.May 1 2020, 11:14 PM
Stan added a subscriber: Stan.

Rebase

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

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/1533/display/redirect

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

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/644/display/redirect

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

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2059/display/redirect

Stan updated this revision to Diff 11772.May 1 2020, 11:26 PM

Fix rogue semicolon

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

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2060/display/redirect

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

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/645/display/redirect

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

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/1534/display/redirect

badosu added a subscriber: badosu.May 2 2020, 12:01 AM

This is great! Can we add a keybinding to ping on the center of the current camera view?

Stan updated this revision to Diff 11773.May 2 2020, 12:07 AM

Fix build

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

Linter detected issues:
Executing section Source...

source/gui/ObjectTypes/CMiniMap.h
|  37| class·CMiniMap·:·public·IGUIObject
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classCMiniMap:' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/messages.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/messages.js
| 351| 351| 	let notificationText =
| 352| 352| 		notification.instructions.reduce((instructions, item) =>
| 353| 353| 			instructions + (typeof item == "string" ? translate(item) : colorizeHotkey(translate(item.text), item.hotkey)),
| 354|    |-			"");
|    | 354|+		"");
| 355| 355| 
| 356| 356| 	Engine.GetGUIObjectByName("tutorialText").caption = g_TutorialMessages.concat(setStringTags(notificationText, g_TutorialNewMessageTags)).join("\n");
| 357| 357| 	g_TutorialMessages.push(notificationText);
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'execute'.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
| 532| 532| 
| 533| 533| 	"cancel-setup-trade-route":
| 534| 534| 	{
| 535|    |-		"execute":function(target, action, selection, queued)
|    | 535|+		"execute": function(target, action, selection, queued)
| 536| 536| 		{
| 537| 537| 			Engine.PostNetworkCommand({
| 538| 538| 				"type": "cancel-setup-trade-route",
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
| 577| 577| 				"cursor": "action-cancel-setup-trade-route",
| 578| 578| 				"tooltip": actionInfo.tooltip,
| 579| 579| 				"target": target
| 580|    |-			}
|    | 580|+			};
| 581| 581| 		},
| 582| 582| 		"specificness": 2,
| 583| 583| 	},
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
|1580|1580| 		"z": target.z
|1581|1581| 	});
|1582|1582| 
|1583|    |-	//TODO: is there a better way to call the ping function of the minimap?
|    |1583|+	// TODO: is there a better way to call the ping function of the minimap?
|1584|1584| 	let minimap = Engine.GetGUIObjectByName("minimap");
|1585|1585| 	minimap.ping_x = target.x;
|1586|1586| 	minimap.ping_z = target.z;

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

binaries/data/mods/public/gui/session/unit_actions.js
| 580| »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
| 527| 527| 			if (cmpGarrisonHolder)
| 528| 528| 			{
| 529| 529| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 530|    |-				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 531|    |-				    && player != +cmd.owner)
|    | 530|+				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits &&
|    | 531|+				    player != +cmd.owner)
| 532| 532| 						continue;
| 533| 533| 
| 534| 534| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
| 529| 529| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 530| 530| 				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 531| 531| 				    && player != +cmd.owner)
| 532|    |-						continue;
|    | 532|+					continue;
| 533| 533| 
| 534| 534| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
| 535| 535| 					notifyUnloadFailure(player, garrisonHolder);
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'metadata'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1151|1151| 
|1152|1152| 	// send Metadata info if any
|1153|1153| 	if (cmd.metadata)
|1154|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1154|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata": cmd.metadata, "owner" : player } );
|1155|1155| 
|1156|1156| 	// Tell the units to start building this new entity
|1157|1157| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'owner'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1151|1151| 
|1152|1152| 	// send Metadata info if any
|1153|1153| 	if (cmd.metadata)
|1154|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1154|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner": player } );
|1155|1155| 
|1156|1156| 	// Tell the units to start building this new entity
|1157|1157| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1151|1151| 
|1152|1152| 	// send Metadata info if any
|1153|1153| 	if (cmd.metadata)
|1154|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1154|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player });
|1155|1155| 
|1156|1156| 	// Tell the units to start building this new entity
|1157|1157| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1259|1259| 		}
|1260|1260| 
|1261|1261| 		lastTowerControlGroup = cmpSnappedStartObstruction.GetControlGroup();
|1262|    |-		//warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|    |1262|+		// warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|1263|1263| 	}
|1264|1264| 
|1265|1265| 	var i = 0;
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1323|1323| 
|1324|1324| 				if (i > 0)
|1325|1325| 				{
|1326|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1326|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1327|1327| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1328|1328| 					// TODO: ensure that cmpPreviousObstruction exists
|1329|1329| 					// TODO: ensure that the previous obstruction does not yet have a secondary control group set
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1486|1486| 		// Check that all its members are selected
|1487|1487| 		var fid = formationIds[0];
|1488|1488| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1489|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1490|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1489|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1490|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1491|1491| 		{
|1492|1492| 			cmpFormation.DeleteTwinFormations();
|1493|1493| 			// The whole formation was selected, so reuse its controller for this command
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1594|1594| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1595|1595| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1596|1596| 				if (matrix[i][j] < distSq)
|1597|    |-					closeClusters = [i,j];
|    |1597|+					closeClusters = [i, j];
|1598|1598| 
|1599|1599| 		// if no more close clusters found, just return all found clusters so far
|1600|1600| 		if (!closeClusters)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1616|1616| 		}
|1617|1617| 		// remove the rows and columns in the matrix for the merged clusters,
|1618|1618| 		// and the clusters themselves from the cluster list
|1619|    |-		clusters.splice(closeClusters[0],1);
|    |1619|+		clusters.splice(closeClusters[0], 1);
|1620|1620| 		clusters.splice(closeClusters[1],1);
|1621|1621| 		matrix.splice(closeClusters[0],1);
|1622|1622| 		matrix.splice(closeClusters[1],1);
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1617|1617| 		// remove the rows and columns in the matrix for the merged clusters,
|1618|1618| 		// and the clusters themselves from the cluster list
|1619|1619| 		clusters.splice(closeClusters[0],1);
|1620|    |-		clusters.splice(closeClusters[1],1);
|    |1620|+		clusters.splice(closeClusters[1], 1);
|1621|1621| 		matrix.splice(closeClusters[0],1);
|1622|1622| 		matrix.splice(closeClusters[1],1);
|1623|1623| 		for (let i = 0; i < matrix.length; ++i)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1618|1618| 		// and the clusters themselves from the cluster list
|1619|1619| 		clusters.splice(closeClusters[0],1);
|1620|1620| 		clusters.splice(closeClusters[1],1);
|1621|    |-		matrix.splice(closeClusters[0],1);
|    |1621|+		matrix.splice(closeClusters[0], 1);
|1622|1622| 		matrix.splice(closeClusters[1],1);
|1623|1623| 		for (let i = 0; i < matrix.length; ++i)
|1624|1624| 		{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1619|1619| 		clusters.splice(closeClusters[0],1);
|1620|1620| 		clusters.splice(closeClusters[1],1);
|1621|1621| 		matrix.splice(closeClusters[0],1);
|1622|    |-		matrix.splice(closeClusters[1],1);
|    |1622|+		matrix.splice(closeClusters[1], 1);
|1623|1623| 		for (let i = 0; i < matrix.length; ++i)
|1624|1624| 		{
|1625|1625| 			if (matrix[i].length > closeClusters[0])
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1623|1623| 		for (let i = 0; i < matrix.length; ++i)
|1624|1624| 		{
|1625|1625| 			if (matrix[i].length > closeClusters[0])
|1626|    |-				matrix[i].splice(closeClusters[0],1);
|    |1626|+				matrix[i].splice(closeClusters[0], 1);
|1627|1627| 			if (matrix[i].length > closeClusters[1])
|1628|1628| 				matrix[i].splice(closeClusters[1],1);
|1629|1629| 		}
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1625|1625| 			if (matrix[i].length > closeClusters[0])
|1626|1626| 				matrix[i].splice(closeClusters[0],1);
|1627|1627| 			if (matrix[i].length > closeClusters[1])
|1628|    |-				matrix[i].splice(closeClusters[1],1);
|    |1628|+				matrix[i].splice(closeClusters[1], 1);
|1629|1629| 		}
|1630|1630| 		// add a new row of distances to the matrix and the new cluster
|1631|1631| 		clusters.push(newCluster);

binaries/data/mods/public/simulation/helpers/Commands.js
|  43| »   if·(g_Commands[cmd.type])
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_Commands' was used before it was defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|  47| »   »   g_Commands[cmd.type](player,·cmd,·data);
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_Commands' was used before it was defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 788| »   »   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
|1282| ····»   »   »   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
|1283| ····»   »   »   break;
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1549| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'actionInfo' to undefined.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 243| 243| 	// if two actions are possible, the first one is taken
| 244| 244| 	// thus the most specific should appear first.
| 245| 245| 
| 246|    |-	let actionInfo = undefined;
|    | 246|+	let actionInfo;
| 247| 247| 	if (preSelectedAction != ACTION_NONE)
| 248| 248| 	{
| 249| 249| 		for (let action of g_UnitActionsSortedKeys)
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unary word operator 'typeof' must be followed by whitespace.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 337| 337| 	}
| 338| 338| 
| 339| 339| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 340|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 340|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 341| 341| 	{
| 342| 342| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 343| 343| 		return false;
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 487| 487| 	mouseIsOverObject = (hoveredObject != null);
| 488| 488| 
| 489| 489| 	// Close the menu when interacting with the game world
| 490|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 491|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 490|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 491|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 492| 492| 		g_Menu.close();
| 493| 493| 
| 494| 494| 	// State-machine processing:
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 648| 648| 		// user to continue building walls.
| 649| 649| 		switch (ev.type)
| 650| 650| 		{
| 651|    |-			case "mousemotion":
|    | 651|+		case "mousemotion":
| 652| 652| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 649| 649| 		switch (ev.type)
| 650| 650| 		{
| 651| 651| 			case "mousemotion":
| 652|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 652|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 651| 651| 			case "mousemotion":
| 652| 652| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654|    |-				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 654|+			// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657| 657| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 652| 652| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655|    |-				// the ending point and the starting point to snap to.
|    | 655|+			// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
| 656|    |-				//
|    | 656|+			//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 657|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 655| 655| 				// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 658|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 656| 656| 				//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 659|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 660|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
| 663| 663| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 661|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
| 663| 663| 
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662|    |-				// points.
|    | 662|+			// points.
| 663| 663| 
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
| 663| 663| 
| 664|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 664|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667| 667| 				if (result && result.cost)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 662| 662| 				// points.
| 663| 663| 
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 665|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667| 667| 				if (result && result.cost)
| 668| 668| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667|    |-				if (result && result.cost)
|    | 667|+			if (result && result.cost)
| 668| 668| 				{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667| 667| 				if (result && result.cost)
| 668|    |-				{
|    | 668|+			{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 666| 666| 
| 667| 667| 				if (result && result.cost)
| 668| 668| 				{
| 669|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 669|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 667| 667| 				if (result && result.cost)
| 668| 668| 				{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670|    |-					placementSupport.tooltipMessage = [
|    | 670|+				placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 668| 668| 				{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671|    |-						getEntityCostTooltip(result),
|    | 671|+					getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
| 674| 674| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672|    |-						getNeededResourcesTooltip(neededResources)
|    | 672|+					getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
| 674| 674| 				}
| 675| 675| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673|    |-					].filter(tip => tip).join("\n");
|    | 673|+				].filter(tip => tip).join("\n");
| 674| 674| 				}
| 675| 675| 
| 676| 676| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
| 674|    |-				}
|    | 674|+			}
| 675| 675| 
| 676| 676| 				break;
| 677| 677| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 673| 673| 					].filter(tip => tip).join("\n");
| 674| 674| 				}
| 675| 675| 
| 676|    |-				break;
|    | 676|+			break;
| 677| 677| 
| 678| 678| 			case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 675| 675| 
| 676| 676| 				break;
| 677| 677| 
| 678|    |-			case "mousebuttondown":
|    | 678|+		case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 676| 676| 				break;
| 677| 677| 
| 678| 678| 			case "mousebuttondown":
| 679|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 679|+			if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 677| 677| 
| 678| 678| 			case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680|    |-				{
|    | 680|+			{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 678| 678| 			case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 681|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
| 684| 684| 						if (queued)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682|    |-					if (tryPlaceWall(queued))
|    | 682|+				if (tryPlaceWall(queued))
| 683| 683| 					{
| 684| 684| 						if (queued)
| 685| 685| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683|    |-					{
|    | 683|+				{
| 684| 684| 						if (queued)
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
| 684|    |-						if (queued)
|    | 684|+					if (queued)
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
| 684| 684| 						if (queued)
| 685|    |-						{
|    | 685|+					{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 683| 683| 					{
| 684| 684| 						if (queued)
| 685| 685| 						{
| 686|    |-							// continue building, just set a new starting position where we left off
|    | 686|+						// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 684| 684| 						if (queued)
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 687|+						placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688|    |-							placementSupport.wallEndPosition = undefined;
|    | 688|+						placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 690|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
| 692| 692| 						else
| 693| 693| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691|    |-						}
|    | 691|+					}
| 692| 692| 						else
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
| 692|    |-						else
|    | 692|+					else
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
| 692| 692| 						else
| 693|    |-						{
|    | 693|+					{
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 691| 691| 						}
| 692| 692| 						else
| 693| 693| 						{
| 694|    |-							placementSupport.Reset();
|    | 694|+						placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697| 697| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 692| 692| 						else
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
| 695|    |-							inputState = INPUT_NORMAL;
|    | 695|+						inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697| 697| 					}
| 698| 698| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696|    |-						}
|    | 696|+					}
| 697| 697| 					}
| 698| 698| 					else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697|    |-					}
|    | 697|+				}
| 698| 698| 					else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697| 697| 					}
| 698|    |-					else
|    | 698|+				else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 696| 696| 						}
| 697| 697| 					}
| 698| 698| 					else
| 699|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 699|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 698| 698| 					else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701|    |-					updateBuildingPlacementPreview();
|    | 701|+				updateBuildingPlacementPreview();
| 702| 702| 					return true;
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
| 702|    |-					return true;
|    | 702|+				return true;
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 					return true;
| 703|    |-				}
|    | 703|+			}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 					return true;
| 703| 703| 				}
| 704|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 704|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 702| 702| 					return true;
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705|    |-				{
|    | 705|+			{
| 706| 706| 					// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706|    |-					// reset to normal input mode
|    | 706|+				// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
| 707|    |-					placementSupport.Reset();
|    | 707|+				placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
| 708|    |-					updateBuildingPlacementPreview();
|    | 708|+				updateBuildingPlacementPreview();
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
| 711| 711| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 707| 707| 					placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
| 710|    |-					inputState = INPUT_NORMAL;
|    | 710|+				inputState = INPUT_NORMAL;
| 711| 711| 					return true;
| 712| 712| 				}
| 713| 713| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
| 711|    |-					return true;
|    | 711|+				return true;
| 712| 712| 				}
| 713| 713| 				break;
| 714| 714| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
| 711| 711| 					return true;
| 712|    |-				}
|    | 712|+			}
| 713| 713| 				break;
| 714| 714| 		}
| 715| 715| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 710| 710| 					inputState = INPUT_NORMAL;
| 711| 711| 					return true;
| 712| 712| 				}
| 713|    |-				break;
|    | 713|+			break;
| 714| 714| 		}
| 715| 715| 		break;
| 716| 716| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 852| 852| 			break;
| 853| 853| 
| 854| 854| 		case "hotkeydown":
| 855|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 855|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 856| 856| 				{
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 853| 853| 
| 854| 854| 		case "hotkeydown":
| 855| 855| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 856|    |-				{
|    | 856|+			{
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 854| 854| 		case "hotkeydown":
| 855| 855| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 856| 856| 				{
| 857|    |-					let now = Date.now();
|    | 857|+				let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 855| 855| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 856| 856| 				{
| 857| 857| 					let now = Date.now();
| 858|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 858|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 856| 856| 				{
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859|    |-					{
|    | 859|+				{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 860|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861|    |-						{
|    | 861|+					{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862|    |-							var sptr = ev.hotkey.split(".");
|    | 862|+						var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865| 865| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863|    |-							performGroup("snap", sptr[3]);
|    | 863|+						performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865| 865| 					}
| 866| 866| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864|    |-						}
|    | 864|+					}
| 865| 865| 					}
| 866| 866| 					else
| 867| 867| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865|    |-					}
|    | 865|+				}
| 866| 866| 					else
| 867| 867| 					{
| 868| 868| 						var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865| 865| 					}
| 866|    |-					else
|    | 866|+				else
| 867| 867| 					{
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 864| 864| 						}
| 865| 865| 					}
| 866| 866| 					else
| 867|    |-					{
|    | 867|+				{
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 865| 865| 					}
| 866| 866| 					else
| 867| 867| 					{
| 868|    |-						var sptr = ev.hotkey.split(".");
|    | 868|+					var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 866| 866| 					else
| 867| 867| 					{
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869|    |-						performGroup(sptr[2], sptr[3]);
|    | 869|+					performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871|    |-						doublePressTimer = now;
|    | 871|+					doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874| 874| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
| 872|    |-						prevHotkey = ev.hotkey;
|    | 872|+					prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874| 874| 				}
| 875| 875| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
| 873|    |-					}
|    | 873|+				}
| 874| 874| 				}
| 875| 875| 				break;
| 876| 876| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 871| 871| 						doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874|    |-				}
|    | 874|+			}
| 875| 875| 				break;
| 876| 876| 		}
| 877| 877| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 872| 872| 						prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874| 874| 				}
| 875|    |-				break;
|    | 875|+			break;
| 876| 876| 		}
| 877| 877| 		break;
| 878| 878| 
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|1604|1604| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1605|1605| 
|1606|1606| 	// Reset the last idle unit, etc., if the selection type has changed.
|1607|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1607|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1608|1608| 		resetIdleUnit();
|1609|1609| 	lastIdleClasses = classes;
|1610|1610| 

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 734| ·»   »   »   »   "template":·placementSupport.template,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
| 735| ·»   »   »   »   "x":·placementSupport.position.x,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
| 740| ·»   »   »   });
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
|1060| ·»   »   »   »   »   "template":·placementSupport.template,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
|1061| ·»   »   »   »   »   "x":·placementSupport.position.x,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
|1062| ·»   »   »   »   »   "z":·placementSupport.position.z,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
|1065| ·»   »   »   »   });
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 934| »   »   »   var·ent·=·Engine.PickEntityAtPoint(ev.x,·ev.y);
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  13|  13| 	{
|  14|  14| 		switch (data.type)
|  15|  15| 		{
|  16|    |-			case "mouserightrelease":
|    |  16|+		case "mouserightrelease":
|  17|  17| 			case "mouserightdoubleclick":
|  18|  18| 			{
|  19|  19| 				// Partly duplicated from handleInputAfterGui(), but with the input being
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  14|  14| 		switch (data.type)
|  15|  15| 		{
|  16|  16| 			case "mouserightrelease":
|  17|    |-			case "mouserightdoubleclick":
|    |  17|+		case "mouserightdoubleclick":
|  18|  18| 			{
|  19|  19| 				// Partly duplicated from handleInputAfterGui(), but with the input being
|  20|  20| 				// world coordinates instead of screen coordinates.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  15|  15| 		{
|  16|  16| 			case "mouserightrelease":
|  17|  17| 			case "mouserightdoubleclick":
|  18|    |-			{
|    |  18|+		{
|  19|  19| 				// Partly duplicated from handleInputAfterGui(), but with the input being
|  20|  20| 				// world coordinates instead of screen coordinates.
|  21|  21| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  16|  16| 			case "mouserightrelease":
|  17|  17| 			case "mouserightdoubleclick":
|  18|  18| 			{
|  19|    |-				// Partly duplicated from handleInputAfterGui(), but with the input being
|    |  19|+			// Partly duplicated from handleInputAfterGui(), but with the input being
|  20|  20| 				// world coordinates instead of screen coordinates.
|  21|  21| 
|  22|  22| 				if (inputState != INPUT_NORMAL)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  17|  17| 			case "mouserightdoubleclick":
|  18|  18| 			{
|  19|  19| 				// Partly duplicated from handleInputAfterGui(), but with the input being
|  20|    |-				// world coordinates instead of screen coordinates.
|    |  20|+			// world coordinates instead of screen coordinates.
|  21|  21| 
|  22|  22| 				if (inputState != INPUT_NORMAL)
|  23|  23| 					return false;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  19|  19| 				// Partly duplicated from handleInputAfterGui(), but with the input being
|  20|  20| 				// world coordinates instead of screen coordinates.
|  21|  21| 
|  22|    |-				if (inputState != INPUT_NORMAL)
|    |  22|+			if (inputState != INPUT_NORMAL)
|  23|  23| 					return false;
|  24|  24| 
|  25|  25| 				let action = determineAction(undefined, undefined, true);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  20|  20| 				// world coordinates instead of screen coordinates.
|  21|  21| 
|  22|  22| 				if (inputState != INPUT_NORMAL)
|  23|    |-					return false;
|    |  23|+				return false;
|  24|  24| 
|  25|  25| 				let action = determineAction(undefined, undefined, true);
|  26|  26| 				return action && handleUnitAction(data.target, action);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  22|  22| 				if (inputState != INPUT_NORMAL)
|  23|  23| 					return false;
|  24|  24| 
|  25|    |-				let action = determineAction(undefined, undefined, true);
|    |  25|+			let action = determineAction(undefined, undefined, true);
|  26|  26| 				return action && handleUnitAction(data.target, action);
|  27|  27| 			}
|  28|  28| 			case "mousemiddlerelease":
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  23|  23| 					return false;
|  24|  24| 
|  25|  25| 				let action = determineAction(undefined, undefined, true);
|  26|    |-				return action && handleUnitAction(data.target, action);
|    |  26|+			return action && handleUnitAction(data.target, action);
|  27|  27| 			}
|  28|  28| 			case "mousemiddlerelease":
|  29|  29| 			case "mousemiddledoubleclick":
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  24|  24| 
|  25|  25| 				let action = determineAction(undefined, undefined, true);
|  26|  26| 				return action && handleUnitAction(data.target, action);
|  27|    |-			}
|    |  27|+		}
|  28|  28| 			case "mousemiddlerelease":
|  29|  29| 			case "mousemiddledoubleclick":
|  30|  30| 			{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  25|  25| 				let action = determineAction(undefined, undefined, true);
|  26|  26| 				return action && handleUnitAction(data.target, action);
|  27|  27| 			}
|  28|    |-			case "mousemiddlerelease":
|    |  28|+		case "mousemiddlerelease":
|  29|  29| 			case "mousemiddledoubleclick":
|  30|  30| 			{
|  31|  31| 				let now = Date.now();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  26|  26| 				return action && handleUnitAction(data.target, action);
|  27|  27| 			}
|  28|  28| 			case "mousemiddlerelease":
|  29|    |-			case "mousemiddledoubleclick":
|    |  29|+		case "mousemiddledoubleclick":
|  30|  30| 			{
|  31|  31| 				let now = Date.now();
|  32|  32| 				if (!g_LastMapPingTime || now > g_LastMapPingTime + 1000) {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  27|  27| 			}
|  28|  28| 			case "mousemiddlerelease":
|  29|  29| 			case "mousemiddledoubleclick":
|  30|    |-			{
|    |  30|+		{
|  31|  31| 				let now = Date.now();
|  32|  32| 				if (!g_LastMapPingTime || now > g_LastMapPingTime + 1000) {
|  33|  33| 					g_LastMapPingTime = now;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  28|  28| 			case "mousemiddlerelease":
|  29|  29| 			case "mousemiddledoubleclick":
|  30|  30| 			{
|  31|    |-				let now = Date.now();
|    |  31|+			let now = Date.now();
|  32|  32| 				if (!g_LastMapPingTime || now > g_LastMapPingTime + 1000) {
|  33|  33| 					g_LastMapPingTime = now;
|  34|  34| 					displayMapPing(data.target, Engine.GetPlayerID());
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  29|  29| 			case "mousemiddledoubleclick":
|  30|  30| 			{
|  31|  31| 				let now = Date.now();
|  32|    |-				if (!g_LastMapPingTime || now > g_LastMapPingTime + 1000) {
|    |  32|+			if (!g_LastMapPingTime || now > g_LastMapPingTime + 1000) {
|  33|  33| 					g_LastMapPingTime = now;
|  34|  34| 					displayMapPing(data.target, Engine.GetPlayerID());
|  35|  35| 					Engine.PostNetworkCommand({
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  30|  30| 			{
|  31|  31| 				let now = Date.now();
|  32|  32| 				if (!g_LastMapPingTime || now > g_LastMapPingTime + 1000) {
|  33|    |-					g_LastMapPingTime = now;
|    |  33|+				g_LastMapPingTime = now;
|  34|  34| 					displayMapPing(data.target, Engine.GetPlayerID());
|  35|  35| 					Engine.PostNetworkCommand({
|  36|  36| 						"type": "map-ping",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  31|  31| 				let now = Date.now();
|  32|  32| 				if (!g_LastMapPingTime || now > g_LastMapPingTime + 1000) {
|  33|  33| 					g_LastMapPingTime = now;
|  34|    |-					displayMapPing(data.target, Engine.GetPlayerID());
|    |  34|+				displayMapPing(data.target, Engine.GetPlayerID());
|  35|  35| 					Engine.PostNetworkCommand({
|  36|  36| 						"type": "map-ping",
|  37|  37| 						"target": data.target
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  32|  32| 				if (!g_LastMapPingTime || now > g_LastMapPingTime + 1000) {
|  33|  33| 					g_LastMapPingTime = now;
|  34|  34| 					displayMapPing(data.target, Engine.GetPlayerID());
|  35|    |-					Engine.PostNetworkCommand({
|    |  35|+				Engine.PostNetworkCommand({
|  36|  36| 						"type": "map-ping",
|  37|  37| 						"target": data.target
|  38|  38| 					});
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  33|  33| 					g_LastMapPingTime = now;
|  34|  34| 					displayMapPing(data.target, Engine.GetPlayerID());
|  35|  35| 					Engine.PostNetworkCommand({
|  36|    |-						"type": "map-ping",
|    |  36|+					"type": "map-ping",
|  37|  37| 						"target": data.target
|  38|  38| 					});
|  39|  39| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  34|  34| 					displayMapPing(data.target, Engine.GetPlayerID());
|  35|  35| 					Engine.PostNetworkCommand({
|  36|  36| 						"type": "map-ping",
|  37|    |-						"target": data.target
|    |  37|+					"target": data.target
|  38|  38| 					});
|  39|  39| 					return true;
|  40|  40| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  35|  35| 					Engine.PostNetworkCommand({
|  36|  36| 						"type": "map-ping",
|  37|  37| 						"target": data.target
|  38|    |-					});
|    |  38|+				});
|  39|  39| 					return true;
|  40|  40| 				}
|  41|  41| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  36|  36| 						"type": "map-ping",
|  37|  37| 						"target": data.target
|  38|  38| 					});
|  39|    |-					return true;
|    |  39|+				return true;
|  40|  40| 				}
|  41|  41| 				break;
|  42|  42| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  37|  37| 						"target": data.target
|  38|  38| 					});
|  39|  39| 					return true;
|  40|    |-				}
|    |  40|+			}
|  41|  41| 				break;
|  42|  42| 			}
|  43|  43| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  38|  38| 					});
|  39|  39| 					return true;
|  40|  40| 				}
|  41|    |-				break;
|    |  41|+			break;
|  42|  42| 			}
|  43|  43| 		}
|  44|  44| 		return false;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  39|  39| 					return true;
|  40|  40| 				}
|  41|  41| 				break;
|  42|    |-			}
|    |  42|+		}
|  43|  43| 		}
|  44|  44| 		return false;
|  45|  45| 	}

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

binaries/data/mods/public/gui/session/minimap/MiniMap.js
|  32| »   »   »   »   if·(!g_LastMapPingTime·||·now·>·g_LastMapPingTime·+·1000)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2061/display/redirect

Imarok added a comment.EditedMay 2 2020, 6:43 PM

This is great! Can we add a keybinding to ping on the center of the current camera view?

We could. current plan was to add a keybinding so you can click anywhere on the minimap or map to do the ping.
Edit: Is there any advantage in also having your center of the view ping?

badosu added a comment.EditedMay 3 2020, 12:14 AM

We could. current plan was to add a keybinding so you can click anywhere on the minimap or map to do the ping.

Yeah, I would expect that, my suggestion was as an addition.

Edit: Is there any advantage in also having your center of the view ping?

Reaching for the minimap with the mouse might be a little imprecise, especially with ongoing action.

It also offers a faster way to ping without disrupting micro/macro (e.g. "this is my base", "this is where I am fighting/rushing", etc)

Imarok edited the summary of this revision. (Show Details)May 15 2020, 6:08 PM
Imarok edited the test plan for this revision. (Show Details)

Note to self: According to Vladislav a texture should be used to draw circles. Scaling should be done with "adding tex coords and so on". Entry point for understanding how that works could be OverlayRenderer::RenderForegroundOverlays.

Imarok updated this revision to Diff 12050.May 29 2020, 8:47 PM

This patch is still WIP.

I did this changes:

  • Rebase.
  • Use a clean way to add a new Flare to the minimap.
  • Add a button for flaring.
  • Use K as hotkey for flaring. (key + Right Click)

TODO (on my side):

  • Clean drawing of circles.
  • Limit the number of flares on the receiver side?

TODO (probably for someone else):

  • highlighted version of the flare button
  • Target Marker for flaring
  • Flaring sound
Owners added a subscriber: Restricted Owners Package.May 29 2020, 8:47 PM

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

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2260/display/redirect

Imarok updated this revision to Diff 12051.May 29 2020, 10:00 PM

Small style fixes.

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

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2261/display/redirect

wraitii added inline comments.Sun, Jun 14, 1:25 PM
source/gui/ObjectTypes/CMiniMap.cpp
506

This loads up the minimap shader with MINIMAP_BASE define.

516

Here it binds the transform and the texture, and then uses the helper DrawTexture to render two triangles at the appropriate coordinates.

You should be able to do exactly the same thing, but call DrawTexture with different x,y,x2,y2 and your Flare texture.

529

See here it's doing the same for territory -> you can pretty much reuse this

556

Here it reloads the shader with MINIMAP_POINT but I think you can just keep MINIMAP_BASE

Imarok updated this revision to Diff 12316.Sun, Jun 14, 8:11 PM

Use a circle texture.

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

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2435/display/redirect

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

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/1904/display/redirect

Imarok added a comment.EditedSat, Jun 20, 11:13 AM

Seems like this does not work with GLSL disabled.
Edit: Found another issue: when pinging at mid of the minimap border, the ping is also drawn outside of the minimap. (I thought scissoring would fix that, but doesn't seem like.)

Imarok added inline comments.Sat, Jun 20, 11:52 AM
source/gui/ObjectTypes/CMiniMap.cpp
685

I needto enable scissoring here to get it. ^^

Imarok updated this revision to Diff 12405.Sun, Jun 21, 4:55 PM

Correct scissoring → Don't draw parts of the ping outside the minimap.

Play the notification sound only for the one receiving the ping.

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

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/1960/display/redirect

Imarok edited the summary of this revision. (Show Details)Sun, Jun 21, 5:06 PM
Imarok edited the test plan for this revision. (Show Details)
Imarok updated this revision to Diff 12411.Sun, Jun 21, 7:41 PM

Add frames for an animated ping.

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

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/1966/display/redirect

Imarok edited the summary of this revision. (Show Details)Sun, Jun 21, 7:42 PM
Imarok edited the summary of this revision. (Show Details)Sun, Jun 21, 7:46 PM
Imarok edited the summary of this revision. (Show Details)Sun, Jun 21, 7:57 PM
Stan added a comment.Fri, Jul 3, 1:49 PM

For map ping alarmally_1.ogg could be used as placeholder