mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-11 16:48:08 +00:00
182d008ddd
**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>
232 lines
4.1 KiB
JSON
232 lines
4.1 KiB
JSON
{
|
|
"categories": ["other"],
|
|
"display_name": "Didier (France)",
|
|
"id": "DidierFrance",
|
|
"map": {
|
|
"height": 2248,
|
|
"num_land_tiles": 2303633,
|
|
"width": 2100
|
|
},
|
|
"map16x": {
|
|
"height": 562,
|
|
"num_land_tiles": 141149,
|
|
"width": 525
|
|
},
|
|
"map4x": {
|
|
"height": 1124,
|
|
"num_land_tiles": 571849,
|
|
"width": 1050
|
|
},
|
|
"multiplayer_frequency": 1,
|
|
"name": "Didier France",
|
|
"nations": [
|
|
{
|
|
"coordinates": [120, 680],
|
|
"flag": "fr",
|
|
"name": "Brest"
|
|
},
|
|
{
|
|
"coordinates": [551, 748],
|
|
"flag": "fr",
|
|
"name": "Rennes"
|
|
},
|
|
{
|
|
"coordinates": [752, 500],
|
|
"flag": "fr",
|
|
"name": "Caen"
|
|
},
|
|
{
|
|
"coordinates": [841, 773],
|
|
"flag": "fr",
|
|
"name": "Le Mans"
|
|
},
|
|
{
|
|
"coordinates": [829, 424],
|
|
"flag": "fr",
|
|
"name": "Le Havre"
|
|
},
|
|
{
|
|
"coordinates": [980, 437],
|
|
"flag": "fr",
|
|
"name": "Rouen"
|
|
},
|
|
{
|
|
"coordinates": [1168, 577],
|
|
"flag": "fr",
|
|
"name": "Paris"
|
|
},
|
|
{
|
|
"coordinates": [1165, 331],
|
|
"flag": "fr",
|
|
"name": "Amiens"
|
|
},
|
|
{
|
|
"coordinates": [1279, 155],
|
|
"flag": "fr",
|
|
"name": "Lille"
|
|
},
|
|
{
|
|
"coordinates": [1096, 81],
|
|
"flag": "fr",
|
|
"name": "Calais"
|
|
},
|
|
{
|
|
"coordinates": [1426, 480],
|
|
"flag": "fr",
|
|
"name": "Reims"
|
|
},
|
|
{
|
|
"coordinates": [1758, 517],
|
|
"flag": "fr",
|
|
"name": "Metz"
|
|
},
|
|
{
|
|
"coordinates": [1762, 613],
|
|
"flag": "fr",
|
|
"name": "Nancy"
|
|
},
|
|
{
|
|
"coordinates": [1999, 642],
|
|
"flag": "fr",
|
|
"name": "Strasbourg"
|
|
},
|
|
{
|
|
"coordinates": [1939, 831],
|
|
"flag": "fr",
|
|
"name": "Mulhouse"
|
|
},
|
|
{
|
|
"coordinates": [1735, 948],
|
|
"flag": "fr",
|
|
"name": "Besançon"
|
|
},
|
|
{
|
|
"coordinates": [1583, 928],
|
|
"flag": "fr",
|
|
"name": "Dijon"
|
|
},
|
|
{
|
|
"coordinates": [1003, 799],
|
|
"flag": "fr",
|
|
"name": "Orléans"
|
|
},
|
|
{
|
|
"coordinates": [916, 911],
|
|
"flag": "fr",
|
|
"name": "Tours"
|
|
},
|
|
{
|
|
"coordinates": [1001, 1259],
|
|
"flag": "fr",
|
|
"name": "Limoges"
|
|
},
|
|
{
|
|
"coordinates": [861, 1095],
|
|
"flag": "fr",
|
|
"name": "Poitiers"
|
|
},
|
|
{
|
|
"coordinates": [939, 1186],
|
|
"flag": "fr",
|
|
"name": "La Rochelle"
|
|
},
|
|
{
|
|
"coordinates": [569, 949],
|
|
"flag": "fr",
|
|
"name": "Nantes"
|
|
},
|
|
{
|
|
"coordinates": [721, 1479],
|
|
"flag": "fr",
|
|
"name": "Bordeaux"
|
|
},
|
|
{
|
|
"coordinates": [1033, 1743],
|
|
"flag": "fr",
|
|
"name": "Toulouse"
|
|
},
|
|
{
|
|
"coordinates": [1258, 1929],
|
|
"flag": "fr",
|
|
"name": "Perpignan"
|
|
},
|
|
{
|
|
"coordinates": [1407, 1739],
|
|
"flag": "fr",
|
|
"name": "Montpellier"
|
|
},
|
|
{
|
|
"coordinates": [1480, 1690],
|
|
"flag": "fr",
|
|
"name": "Nîmes"
|
|
},
|
|
{
|
|
"coordinates": [1555, 1669],
|
|
"flag": "fr",
|
|
"name": "Avignon"
|
|
},
|
|
{
|
|
"coordinates": [1634, 1808],
|
|
"flag": "fr",
|
|
"name": "Marseille"
|
|
},
|
|
{
|
|
"coordinates": [1722, 1843],
|
|
"flag": "fr",
|
|
"name": "Toulon"
|
|
},
|
|
{
|
|
"coordinates": [1829, 1817],
|
|
"flag": "fr",
|
|
"name": "Saint-Tropez"
|
|
},
|
|
{
|
|
"coordinates": [1887, 1749],
|
|
"flag": "fr",
|
|
"name": "Cannes"
|
|
},
|
|
{
|
|
"coordinates": [1925, 1718],
|
|
"flag": "fr",
|
|
"name": "Nice"
|
|
},
|
|
{
|
|
"coordinates": [565, 1784],
|
|
"flag": "fr",
|
|
"name": "Biarritz"
|
|
},
|
|
{
|
|
"coordinates": [1483, 1349],
|
|
"flag": "fr",
|
|
"name": "Saint-Étienne"
|
|
},
|
|
{
|
|
"coordinates": [1558, 1278],
|
|
"flag": "fr",
|
|
"name": "Lyon"
|
|
},
|
|
{
|
|
"coordinates": [1692, 1402],
|
|
"flag": "fr",
|
|
"name": "Grenoble"
|
|
},
|
|
{
|
|
"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"
|
|
}
|
|
],
|
|
"translation_key": "map.didierfrance"
|
|
}
|