Generate a single MapInfo list; move SPECIAL_TEAM_MAPS and en.json map names into info.json (#4231)

**Add approved & assigned issue number here:**

N/A — maintainer follow-up to #4227.

## Description:

Follow-up to #4227, finishing the "info.json is the single source of
truth" refactor.

**Maps.gen.ts now generates one `MapInfo` interface and a `maps` list**
instead of parallel lookup records. `mapCategories`,
`mapTranslationKeys`, and `multiplayerFrequency` are gone — consumers
read the list directly (`map.categories`, `map.translationKey`,
`map.multiplayerFrequency`). MapPicker got simpler in the process: it
renders from `MapInfo` objects, so the reverse
`Object.entries(GameMapType)` lookup to recover the enum key is gone.
The featured-rank sort moved out of the Go codegen into the picker,
where the presentation concern belongs.

**`SPECIAL_TEAM_MAPS` moves into info.json** as an optional
`special_team_count` field (set on the same 17 maps with the same
values). MapPlaylist derives its map from the generated list;
`SPECIAL_TEAM_FORCE_CHANCE` and the frequency multiplier behavior are
unchanged.

**The en.json `map` section is now generated.** A new optional
`display_name` field in info.json (defaulting to `name`) is written to
`resources/lang/en.json` by the generator, preserving the section's
non-map UI keys (`map`, `featured`, `all`, `favorites`, `random`). The 8
maps whose English display name intentionally differs from the frozen
enum value (e.g. `MENA`, `Milky Way`, `Europe (Classic)`, `Baikal (Nuke
Wars)`) declare it via `display_name`, so no display text changes. The
section is emitted alphabetically; since #4232 already sorted en.json
and every value matches, regeneration is byte-identical and this PR has
no en.json diff. Other languages remain Crowdin-managed.

The generator also now validates `translation_key` is exactly
`map.<folder>` and `special_team_count >= 2`. MapConsistency tests
compare info.json directly against the generated list and the en.json
section, and fail with a "run `npm run gen-maps`" message on drift. No
behavior changes: enum values, playlist frequencies, special-team
counts, featured order, and display names are all byte-identical.

## Please complete the following:

- [x] I have added screenshots for all UI updates (no UI changes —
internal refactor, rendering output identical)
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory

## Please put your Discord username so you can be contacted if a bug or
regression is found:

evanpelle

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Evan
2026-06-11 21:06:48 -07:00
committed by GitHub
co-authored by Claude Fable 5
parent be177f445a
commit 182d008ddd
60 changed files with 1099 additions and 508 deletions
@@ -4,6 +4,7 @@
"translation_key": "map.aegean",
"categories": ["europe"],
"multiplayer_frequency": 6,
"special_team_count": 2,
"nations": [
{
"coordinates": [786, 1860],
@@ -1,6 +1,7 @@
{
"id": "ArchipelagoSea",
"name": "ArchipelagoSea",
"display_name": "Archipelago Sea",
"translation_key": "map.archipelagosea",
"categories": ["europe"],
"multiplayer_frequency": 3,
@@ -4,6 +4,7 @@
"translation_key": "map.baikal",
"categories": ["asia"],
"multiplayer_frequency": 5,
"special_team_count": 2,
"nations": [
{
"coordinates": [695, 665],
@@ -1,6 +1,7 @@
{
"id": "BaikalNukeWars",
"name": "Baikal Nuke Wars",
"display_name": "Baikal (Nuke Wars)",
"translation_key": "map.baikalnukewars",
"categories": ["other"],
"multiplayer_frequency": 0,
@@ -4,6 +4,7 @@
"translation_key": "map.beringsea",
"categories": ["asia", "north_america"],
"multiplayer_frequency": 5,
"special_team_count": 2,
"nations": [
{
"coordinates": [1043, 121],
@@ -4,6 +4,7 @@
"translation_key": "map.beringstrait",
"categories": ["asia", "north_america"],
"multiplayer_frequency": 2,
"special_team_count": 2,
"nations": [
{
"coordinates": [1297, 287],
@@ -4,6 +4,7 @@
"translation_key": "map.bosphorusstraits",
"categories": ["europe", "asia"],
"multiplayer_frequency": 3,
"special_team_count": 2,
"nations": [
{
"coordinates": [564, 245],
@@ -1,6 +1,7 @@
{
"id": "BritanniaClassic",
"name": "Britannia Classic",
"display_name": "Britannia (Classic)",
"translation_key": "map.britanniaclassic",
"categories": ["europe"],
"multiplayer_frequency": 0,
@@ -4,6 +4,7 @@
"translation_key": "map.choppingblock",
"categories": ["other"],
"multiplayer_frequency": 5,
"special_team_count": 4,
"nations": [
{
"coordinates": [230, 230],
@@ -4,6 +4,7 @@
"translation_key": "map.conakry",
"categories": ["africa"],
"multiplayer_frequency": 3,
"special_team_count": 2,
"nations": [
{
"coordinates": [510, 420],
@@ -1,6 +1,7 @@
{
"id": "DidierFrance",
"name": "Didier France",
"display_name": "Didier (France)",
"translation_key": "map.didierfrance",
"categories": ["other"],
"multiplayer_frequency": 1,
@@ -1,6 +1,7 @@
{
"id": "EuropeClassic",
"name": "Europe Classic",
"display_name": "Europe (Classic)",
"translation_key": "map.europeclassic",
"categories": ["europe"],
"multiplayer_frequency": 0,
@@ -4,6 +4,7 @@
"translation_key": "map.falklandislands",
"categories": ["south_america"],
"multiplayer_frequency": 4,
"special_team_count": 2,
"nations": [
{
"coordinates": [484, 987],
@@ -4,6 +4,7 @@
"translation_key": "map.fourislands",
"categories": ["other"],
"multiplayer_frequency": 4,
"special_team_count": 4,
"nations": [
{
"coordinates": [403, 1296],
@@ -4,6 +4,7 @@
"translation_key": "map.gulfofstlawrence",
"categories": ["north_america"],
"multiplayer_frequency": 4,
"special_team_count": 3,
"nations": [
{
"coordinates": [88, 364],
@@ -4,6 +4,7 @@
"translation_key": "map.juandefucastrait",
"categories": ["north_america"],
"multiplayer_frequency": 4,
"special_team_count": 3,
"nations": [
{
"coordinates": [1812, 445],
+1
View File
@@ -4,6 +4,7 @@
"translation_key": "map.luna",
"categories": ["cosmic"],
"multiplayer_frequency": 6,
"special_team_count": 2,
"nations": [
{
"coordinates": [265, 662],
+1
View File
@@ -1,6 +1,7 @@
{
"id": "Mena",
"name": "Mena",
"display_name": "MENA",
"translation_key": "map.mena",
"categories": ["asia", "africa"],
"multiplayer_frequency": 6,
@@ -1,6 +1,7 @@
{
"id": "MilkyWay",
"name": "MilkyWay",
"display_name": "Milky Way",
"translation_key": "map.milkyway",
"categories": ["cosmic"],
"multiplayer_frequency": 8,
@@ -4,6 +4,7 @@
"translation_key": "map.pluto",
"categories": ["cosmic"],
"multiplayer_frequency": 6,
"special_team_count": 2,
"nations": [
{
"coordinates": [396, 364],
@@ -1,6 +1,7 @@
{
"id": "SoutheastAsia",
"name": "SoutheastAsia",
"display_name": "Southeast Asia",
"translation_key": "map.southeastasia",
"categories": ["asia"],
"multiplayer_frequency": 5,
@@ -4,6 +4,7 @@
"translation_key": "map.straitofgibraltar",
"categories": ["europe", "africa"],
"multiplayer_frequency": 5,
"special_team_count": 2,
"nations": [
{
"coordinates": [1941, 1031],
@@ -4,6 +4,7 @@
"translation_key": "map.straitofhormuz",
"categories": ["asia"],
"multiplayer_frequency": 4,
"special_team_count": 2,
"nations": [
{
"coordinates": [837, 356],
@@ -4,6 +4,7 @@
"translation_key": "map.surrounded",
"categories": ["other"],
"multiplayer_frequency": 4,
"special_team_count": 4,
"nations": [
{
"coordinates": [1043, 910],
@@ -4,6 +4,7 @@
"translation_key": "map.tradersdream",
"categories": ["other"],
"multiplayer_frequency": 4,
"special_team_count": 2,
"nations": [
{
"coordinates": [1010, 120],