Files
Evan 182d008ddd 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>
2026-06-11 21:06:48 -07:00

217 lines
3.9 KiB
JSON

{
"id": "DidierFrance",
"name": "Didier France",
"display_name": "Didier (France)",
"translation_key": "map.didierfrance",
"categories": ["other"],
"multiplayer_frequency": 1,
"nations": [
{
"coordinates": [120, 680],
"name": "Brest",
"flag": "fr"
},
{
"coordinates": [551, 748],
"name": "Rennes",
"flag": "fr"
},
{
"coordinates": [752, 500],
"name": "Caen",
"flag": "fr"
},
{
"coordinates": [841, 773],
"name": "Le Mans",
"flag": "fr"
},
{
"coordinates": [829, 424],
"name": "Le Havre",
"flag": "fr"
},
{
"coordinates": [980, 437],
"name": "Rouen",
"flag": "fr"
},
{
"coordinates": [1168, 577],
"name": "Paris",
"flag": "fr"
},
{
"coordinates": [1165, 331],
"name": "Amiens",
"flag": "fr"
},
{
"coordinates": [1279, 155],
"name": "Lille",
"flag": "fr"
},
{
"coordinates": [1096, 81],
"name": "Calais",
"flag": "fr"
},
{
"coordinates": [1426, 480],
"name": "Reims",
"flag": "fr"
},
{
"coordinates": [1758, 517],
"name": "Metz",
"flag": "fr"
},
{
"coordinates": [1762, 613],
"name": "Nancy",
"flag": "fr"
},
{
"coordinates": [1999, 642],
"name": "Strasbourg",
"flag": "fr"
},
{
"coordinates": [1939, 831],
"name": "Mulhouse",
"flag": "fr"
},
{
"coordinates": [1735, 948],
"name": "Besançon",
"flag": "fr"
},
{
"coordinates": [1583, 928],
"name": "Dijon",
"flag": "fr"
},
{
"coordinates": [1003, 799],
"name": "Orléans",
"flag": "fr"
},
{
"coordinates": [916, 911],
"name": "Tours",
"flag": "fr"
},
{
"coordinates": [1001, 1259],
"name": "Limoges",
"flag": "fr"
},
{
"coordinates": [861, 1095],
"name": "Poitiers",
"flag": "fr"
},
{
"coordinates": [939, 1186],
"name": "La Rochelle",
"flag": "fr"
},
{
"coordinates": [569, 949],
"name": "Nantes",
"flag": "fr"
},
{
"coordinates": [721, 1479],
"name": "Bordeaux",
"flag": "fr"
},
{
"coordinates": [1033, 1743],
"name": "Toulouse",
"flag": "fr"
},
{
"coordinates": [1258, 1929],
"name": "Perpignan",
"flag": "fr"
},
{
"coordinates": [1407, 1739],
"name": "Montpellier",
"flag": "fr"
},
{
"coordinates": [1480, 1690],
"name": "Nîmes",
"flag": "fr"
},
{
"coordinates": [1555, 1669],
"name": "Avignon",
"flag": "fr"
},
{
"coordinates": [1634, 1808],
"name": "Marseille",
"flag": "fr"
},
{
"coordinates": [1722, 1843],
"name": "Toulon",
"flag": "fr"
},
{
"coordinates": [1829, 1817],
"name": "Saint-Tropez",
"flag": "fr"
},
{
"coordinates": [1887, 1749],
"name": "Cannes",
"flag": "fr"
},
{
"coordinates": [1925, 1718],
"name": "Nice",
"flag": "fr"
},
{
"coordinates": [565, 1784],
"name": "Biarritz",
"flag": "fr"
},
{
"coordinates": [1483, 1349],
"name": "Saint-Étienne",
"flag": "fr"
},
{
"coordinates": [1558, 1278],
"name": "Lyon",
"flag": "fr"
},
{
"coordinates": [1692, 1402],
"name": "Grenoble",
"flag": "fr"
},
{
"coordinates": [1459, 1888],
"name": "Didier's Right Foot"
},
{
"coordinates": [482, 1196],
"name": "Didier's Left Hand"
},
{
"coordinates": [1237, 1147],
"name": "Napolidier"
},
{
"coordinates": [2012, 2198],
"name": "Arryn"
}
]
}