Page MenuHomeWildfire Games

Display trigger difficulty in the gamedescription
ClosedPublic

Authored by elexis on Mar 15 2018, 7:32 PM.

Details

Summary

When adding a map with difficulty settings, it must be seen in the gamesetup and session window.

Test Plan

Is the order correct? It seems the map description scrolls away all of the more relevant settings.

Index: binaries/data/mods/public/maps/random/jebel_barkal.json
===================================================================
--- binaries/data/mods/public/maps/random/jebel_barkal.json	(revision 21557)
+++ binaries/data/mods/public/maps/random/jebel_barkal.json	(working copy)
@@ -7,8 +7,18 @@
 		"Keywords": ["new", "trigger"],
 		"CircularMap": true,
 		"TriggerScripts" : [
 			"scripts/TriggerHelper.js",
 			"random/jebel_barkal_triggers.js"
-		]
+		],
+		"SupportedTriggerDifficulties": {
+			"Values": [
+				"Very Easy",
+				"Easy",
+				"Medium",
+				"Hard",
+				"Very Hard"
+			],
+			"Default": "Medium"
+		}
 	}
 }

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

elexis created this revision.Mar 15 2018, 7:32 PM
Vulcan added a subscriber: Vulcan.Mar 15 2018, 8:22 PM

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

Linter detected issues:
Executing section Default...
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|  96|  96| 
|  97|  97| 		let playerDescription;
|  98|  98| 		if (isAI)
|  99|    |-		{
|    |  99|+		
| 100| 100| 			if (playerData.Civ)
| 101| 101| 			{
| 102| 102| 				if (isActive)
| 115| 115| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 116| 116| 					playerDescription = translate("%(playerName)s (%(AIdescription)s, %(state)s)");
| 117| 117| 			}
| 118|    |-		}
|    | 118|+		
| 119| 119| 		else
| 120| 120| 		{
| 121| 121| 			if (playerData.Offline)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|  98|  98| 		if (isAI)
|  99|  99| 		{
| 100| 100| 			if (playerData.Civ)
| 101|    |-			{
|    | 101|+			
| 102| 102| 				if (isActive)
| 103| 103| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 104| 104| 					playerDescription = translate("%(playerName)s (%(civ)s, %(AIdescription)s)");
| 105| 105| 				else
| 106| 106| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 107| 107| 					playerDescription = translate("%(playerName)s (%(civ)s, %(AIdescription)s, %(state)s)");
| 108|    |-			}
|    | 108|+			
| 109| 109| 			else
| 110| 110| 			{
| 111| 111| 				if (isActive)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 107| 107| 					playerDescription = translate("%(playerName)s (%(civ)s, %(AIdescription)s, %(state)s)");
| 108| 108| 			}
| 109| 109| 			else
| 110|    |-			{
|    | 110|+			
| 111| 111| 				if (isActive)
| 112| 112| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 113| 113| 					playerDescription = translate("%(playerName)s (%(AIdescription)s)");
| 114| 114| 				else
| 115| 115| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 116| 116| 					playerDescription = translate("%(playerName)s (%(AIdescription)s, %(state)s)");
| 117|    |-			}
|    | 117|+			
| 118| 118| 		}
| 119| 119| 		else
| 120| 120| 		{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 117| 117| 			}
| 118| 118| 		}
| 119| 119| 		else
| 120|    |-		{
|    | 120|+		
| 121| 121| 			if (playerData.Offline)
| 122| 122| 			{
| 123| 123| 				// Can only occur in the lobby for now, so no strings with civ needed
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
| 147| 147| 			}
| 148|    |-		}
|    | 148|+		
| 149| 149| 
| 150| 150| 		// Sort player descriptions by team
| 151| 151| 		if (!playerDescriptions[teamIdx])
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 119| 119| 		else
| 120| 120| 		{
| 121| 121| 			if (playerData.Offline)
| 122|    |-			{
|    | 122|+			
| 123| 123| 				// Can only occur in the lobby for now, so no strings with civ needed
| 124| 124| 				if (isActive)
| 125| 125| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 127| 127| 				else
| 128| 128| 					// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 129| 129| 					playerDescription = translate("%(playerName)s (OFFLINE, %(state)s)");
| 130|    |-			}
|    | 130|+			
| 131| 131| 			else
| 132| 132| 			{
| 133| 133| 				if (playerData.Civ)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 129| 129| 					playerDescription = translate("%(playerName)s (OFFLINE, %(state)s)");
| 130| 130| 			}
| 131| 131| 			else
| 132|    |-			{
|    | 132|+			
| 133| 133| 				if (playerData.Civ)
| 134| 134| 					if (isActive)
| 135| 135| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 144| 144| 					else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
| 147|    |-			}
|    | 147|+			
| 148| 148| 		}
| 149| 149| 
| 150| 150| 		// Sort player descriptions by team
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 138| 138| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 139| 139| 						playerDescription = translate("%(playerName)s (%(civ)s, %(state)s)");
| 140| 140| 				else
| 141|    |-					if (isActive)
|    | 141|+				if (isActive)
| 142| 142| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144| 144| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 139| 139| 						playerDescription = translate("%(playerName)s (%(civ)s, %(state)s)");
| 140| 140| 				else
| 141| 141| 					if (isActive)
| 142|    |-						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
|    | 142|+				// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144| 144| 					else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 140| 140| 				else
| 141| 141| 					if (isActive)
| 142| 142| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143|    |-						playerDescription = translate("%(playerName)s");
|    | 143|+					playerDescription = translate("%(playerName)s");
| 144| 144| 					else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 141| 141| 					if (isActive)
| 142| 142| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144|    |-					else
|    | 144|+				else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
| 147| 147| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 142| 142| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144| 144| 					else
| 145|    |-						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
|    | 145|+				// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146| 146| 						playerDescription = translate("%(playerName)s (%(state)s)");
| 147| 147| 			}
| 148| 148| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 143| 143| 						playerDescription = translate("%(playerName)s");
| 144| 144| 					else
| 145| 145| 						// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
| 146|    |-						playerDescription = translate("%(playerName)s (%(state)s)");
|    | 146|+					playerDescription = translate("%(playerName)s (%(state)s)");
| 147| 147| 			}
| 148| 148| 		}
| 149| 149| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 333| 333| 		titles.push({
| 334| 334| 			"label": translate("Map Description"),
| 335| 335| 			"value": g_GameAttributes.settings.Description ?
| 336|    |-					translate(g_GameAttributes.settings.Description) :
|    | 336|+				translate(g_GameAttributes.settings.Description) :
| 337| 337| 					translate("Sorry, no description available.")
| 338| 338| 		});
| 339| 339| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/gamedescription.js
| 334| 334| 			"label": translate("Map Description"),
| 335| 335| 			"value": g_GameAttributes.settings.Description ?
| 336| 336| 					translate(g_GameAttributes.settings.Description) :
| 337|    |-					translate("Sorry, no description available.")
|    | 337|+				translate("Sorry, no description available.")
| 338| 338| 		});
| 339| 339| 	}
| 340| 340| 

binaries/data/mods/public/gui/common/gamedescription.js
| 343| »   »   let·difficulty·=·g_Settings.TriggerDifficulties.find(difficulty·=>·difficulty.Difficulty·==·g_GameAttributes.settings.TriggerDifficulty);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'difficulty' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  62|  62| var g_RomanNumbers = [undefined, "I", "II", "III", "IV", "V", "VI", "VII", "VIII"];
|  63|  63| 
|  64|  64| var g_PlayerTeamList = prepareForDropdown([{
|  65|    |-		"label": translateWithContext("team", "None"),
|    |  65|+	"label": translateWithContext("team", "None"),
|  66|  66| 		"id": -1
|  67|  67| 	}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  63|  63| 
|  64|  64| var g_PlayerTeamList = prepareForDropdown([{
|  65|  65| 		"label": translateWithContext("team", "None"),
|  66|    |-		"id": -1
|    |  66|+	"id": -1
|  67|  67| 	}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 0 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  64|  64| var g_PlayerTeamList = prepareForDropdown([{
|  65|  65| 		"label": translateWithContext("team", "None"),
|  66|  66| 		"id": -1
|  67|    |-	}].concat(
|    |  67|+}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|  70|  70| 			"id": i
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  65|  65| 		"label": translateWithContext("team", "None"),
|  66|  66| 		"id": -1
|  67|  67| 	}].concat(
|  68|    |-		Array(g_MaxTeams).fill(0).map((v, i) => ({
|    |  68|+	Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|  70|  70| 			"id": i
|  71|  71| 		}))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  66|  66| 		"id": -1
|  67|  67| 	}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|    |-			"label": i + 1,
|    |  69|+		"label": i + 1,
|  70|  70| 			"id": i
|  71|  71| 		}))
|  72|  72| 	)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  67|  67| 	}].concat(
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|  70|    |-			"id": i
|    |  70|+		"id": i
|  71|  71| 		}))
|  72|  72| 	)
|  73|  73| );
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  68|  68| 		Array(g_MaxTeams).fill(0).map((v, i) => ({
|  69|  69| 			"label": i + 1,
|  70|  70| 			"id": i
|  71|    |-		}))
|    |  71|+	}))
|  72|  72| 	)
|  73|  73| );
|  74|  74| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 0 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  69|  69| 			"label": i + 1,
|  70|  70| 			"id": i
|  71|  71| 		}))
|  72|    |-	)
|    |  72|+)
|  73|  73| );
|  74|  74| 
|  75|  75| /**
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  78|  78| var g_RelicCountList = Object.keys(g_CivData).map((civ, i) => i + 1);
|  79|  79| 
|  80|  80| var g_PlayerCivList = g_CivData && prepareForDropdown([{
|  81|    |-		"name": translateWithContext("civilization", "Random"),
|    |  81|+	"name": translateWithContext("civilization", "Random"),
|  82|  82| 		"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|  83| 		"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  79|  79| 
|  80|  80| var g_PlayerCivList = g_CivData && prepareForDropdown([{
|  81|  81| 		"name": translateWithContext("civilization", "Random"),
|  82|    |-		"tooltip": translate("Picks one civilization at random when the game starts."),
|    |  82|+	"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|  83| 		"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|  85|  85| 	}].concat(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  80|  80| var g_PlayerCivList = g_CivData && prepareForDropdown([{
|  81|  81| 		"name": translateWithContext("civilization", "Random"),
|  82|  82| 		"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|    |-		"color": g_ColorRandom,
|    |  83|+	"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|  85|  85| 	}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  81|  81| 		"name": translateWithContext("civilization", "Random"),
|  82|  82| 		"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|  83| 		"color": g_ColorRandom,
|  84|    |-		"code": "random"
|    |  84|+	"code": "random"
|  85|  85| 	}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 0 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  82|  82| 		"tooltip": translate("Picks one civilization at random when the game starts."),
|  83|  83| 		"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|  85|    |-	}].concat(
|    |  85|+}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  83|  83| 		"color": g_ColorRandom,
|  84|  84| 		"code": "random"
|  85|  85| 	}].concat(
|  86|    |-		Object.keys(g_CivData).filter(
|    |  86|+	Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  84|  84| 		"code": "random"
|  85|  85| 	}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|    |-			civ => g_CivData[civ].SelectableInGameSetup
|    |  87|+		civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  85|  85| 	}].concat(
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|    |-		).map(civ => ({
|    |  88|+	).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  86|  86| 		Object.keys(g_CivData).filter(
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|  89|    |-			"name": g_CivData[civ].Name,
|    |  89|+		"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|  92|  92| 			"code": civ
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  87|  87| 			civ => g_CivData[civ].SelectableInGameSetup
|  88|  88| 		).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|    |-			"tooltip": g_CivData[civ].History,
|    |  90|+		"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|  92|  92| 			"code": civ
|  93|  93| 		})).sort(sortNameIgnoreCase)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  88|  88| 		).map(civ => ({
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|    |-			"color": g_ColorRegular,
|    |  91|+		"color": g_ColorRegular,
|  92|  92| 			"code": civ
|  93|  93| 		})).sort(sortNameIgnoreCase)
|  94|  94| 	)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  89|  89| 			"name": g_CivData[civ].Name,
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|  92|    |-			"code": civ
|    |  92|+		"code": civ
|  93|  93| 		})).sort(sortNameIgnoreCase)
|  94|  94| 	)
|  95|  95| );
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  90|  90| 			"tooltip": g_CivData[civ].History,
|  91|  91| 			"color": g_ColorRegular,
|  92|  92| 			"code": civ
|  93|    |-		})).sort(sortNameIgnoreCase)
|    |  93|+	})).sort(sortNameIgnoreCase)
|  94|  94| 	)
|  95|  95| );
|  96|  96| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 0 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|  91|  91| 			"color": g_ColorRegular,
|  92|  92| 			"code": civ
|  93|  93| 		})).sort(sortNameIgnoreCase)
|  94|    |-	)
|    |  94|+)
|  95|  95| );
|  96|  96| 
|  97|  97| /**
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|1134|1134| 		translate("%(hotkey_civinfo)s / %(hotkey_structree)s: View History / Structure Tree\nLast opened will be reopened on click."), {
|1135|1135| 			"hotkey_civinfo": colorizeHotkey("%(hotkey)s", "civinfo"),
|1136|1136| 			"hotkey_structree": colorizeHotkey("%(hotkey)s", "structree")
|1137|    |-	});
|    |1137|+		});
|1138|1138| }
|1139|1139| 
|1140|1140| function initDefaults()
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/gamesetup/gamesetup.js
|1732|1732| 	let biomeList;
|1733|1733| 
|1734|1734| 	if (g_GameAttributes.mapType == "random" && g_GameAttributes.settings.SupportedBiomes)
|1735|    |-	{
|    |1735|+	
|1736|1736| 		if (typeof g_GameAttributes.settings.SupportedBiomes == "string")
|1737|1737| 			biomeList = g_Settings.Biomes.filter(biome => biome.Id.startsWith(g_GameAttributes.settings.SupportedBiomes));
|1738|1738| 		else
|1739|1739| 			biomeList = g_Settings.Biomes.filter(
|1740|1740| 				biome => g_GameAttributes.settings.SupportedBiomes.indexOf(biome.Id) != -1);
|1741|    |-	}
|    |1741|+	
|1742|1742| 
|1743|1743| 	g_BiomeList = biomeList && prepareForDropdown(
|1744|1744| 		[{

binaries/data/mods/public/gui/gamesetup/gamesetup.js
|1963| »   while·(g_IsNetworked)
|    | [NORMAL] ESLintBear (no-unmodified-loop-condition):
|    | 'g_IsNetworked' is not modified in this loop.

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

bb accepted this revision.Mar 16 2018, 12:02 AM

I would put the stuff between biome and nomad, further looks, ok, should be no new translated strings in here

didn't test but as we say in Dutch "I would eat my hat if it breaks"

This revision is now accepted and ready to land.Mar 16 2018, 12:02 AM

the stuff

(Please don't make the reader guess what stuff is)

Yeah, I'll put the difficulty in the gamedescription between biome and nomad, so that the order of mapname, mapdescr, mapsize, maptype is always the same.
Players have to read carefully either way.

But I'm still dubious about the map description. It consumes most of the window and players can't see the gamesettings at the top and bottom simultaneously without scrolling.
Shall we move the mapdescr to the bottom? (Noone reads it to begin with!)

Thanks for the review.

binaries/data/mods/public/gui/common/gamedescription.js
345 ↗(On Diff #6177)

This also seems to have the same problem as displaying a "Wonder" checkbox in the gamesetup. This value itself doesn't reveal it's meaning - there could be many things that are "medium".
We likely have to implement multiple title strings somehow sometime.

This revision was automatically updated to reflect the committed changes.
Owners added a subscriber: Restricted Owners Package.Mar 16 2018, 3:18 PM