Files
OpenFrontIO/resources/maps/gatewaytotheatlantic/manifest.json
T
Evan 3de5fb4204 Move map metadata into info.json and generate map TypeScript from it (#4227)
**Add approved & assigned issue number here:**

N/A — maintainer refactor.

## Description:

Makes each map's `info.json` the single source of truth for map metadata
— adding a map is now a folder with `image.png` + `info.json`, a
`gen-maps` run, and an en.json display name.

**info.json / manifest.json carry full map metadata.** Every
`map-generator/assets/maps/<map>/info.json` declares `id` (the
`GameMapType` enum key), `name` (the enum value — wire format, unchanged
for all 94 maps), `translation_key`, `categories`, and
`multiplayer_frequency` (the public-playlist weight that used to be the
`FREQUENCY` record in MapPlaylist.ts). The generator validates
everything and mirrors it into `resources/maps/<map>/manifest.json`. 23
stale info.json `name` values were normalized to the canonical enum
value; enum values are byte-identical, so replays and stored game
configs are unaffected.

**The generator emits the TypeScript and discovers maps itself.** New
`map-generator/codegen.go` generates `src/core/game/Maps.gen.ts`
(`GameMapType`, `GameMapName`, `mapCategories`, `mapTranslationKeys`,
`multiplayerFrequency` — now a full `Record<GameMapName, number>`,
killing the old `Partial`) on every run; `Game.ts` re-exports it. The
hardcoded map registry in `main.go` is gone — maps are auto-discovered
from the `assets/maps` / `assets/test_maps` directories. MapConsistency
tests fail with a "run `npm run gen-maps`" message if info.json,
manifest.json, and Maps.gen.ts drift. The tracked
`map-generator/map-generator` binary is rebuilt to match.

**New categories: continents + world/cosmic/tournament/other,
multi-category support.** `continental`/`regional`/`fantasy`/`arcade`
are replaced by `featured`, `world`, `europe`, `asia`, `north_america`,
`africa`, `south_america`, `oceania`, `antarctica`, `cosmic`,
`tournament`, and `other`. Maps can list multiple categories, so
straddlers (Black Sea, Bosphorus, Caucasus, Between Two Seas, Bering
Sea/Strait, Mena, Strait of Gibraltar, Hawaii, Arctic) appear under both
regions. Featured is itself a category (same 7 maps as before).
MapPlaylist keeps its arcade exclusion via an explicit set.

**Map picker UI.** Two tabs: **Featured** (default — featured maps plus
a Favorites section when maps are starred) and **All** (one prominent
collapsible bar per category with a map count, collapsed by default).
The selected map is prepended to the featured grid when it lives
elsewhere. `getMapName()` resolves through the generated
`mapTranslationKeys`, which also fixes tourney maps never resolving a
valid translation key.

## Please complete the following:

- [ ] I have added screenshots for all UI updates (maintainer change —
picker described above)
- [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 19:36:53 -07:00

160 lines
3.3 KiB
JSON

{
"categories": ["europe"],
"id": "GatewayToTheAtlantic",
"map": {
"height": 1968,
"num_land_tiles": 2239824,
"width": 2216
},
"map16x": {
"height": 492,
"num_land_tiles": 136293,
"width": 554
},
"map4x": {
"height": 984,
"num_land_tiles": 554984,
"width": 1108
},
"multiplayer_frequency": 5,
"name": "Gateway to the Atlantic",
"nations": [
{
"coordinates": [2161, 420],
"flag": "ch",
"name": "Swiss Confederation"
},
{
"coordinates": [1938, 263],
"flag": "burgundy",
"name": "Duchy of Burgundy"
},
{
"coordinates": [1388, 485],
"flag": "aquitaine",
"name": "Duchy of Aquitaine"
},
{
"coordinates": [2137, 636],
"flag": "provence",
"name": "County of Provence"
},
{
"coordinates": [1266, 748],
"flag": "navarre",
"name": "Kingdom of Navarre"
},
{
"coordinates": [1375, 1190],
"flag": "valencia",
"name": "Kingdom of Valencia"
},
{
"coordinates": [1696, 858],
"flag": "catalonia",
"name": "Catalonia"
},
{
"coordinates": [543, 807],
"flag": "es-ga",
"name": "Kingdom of Galicia"
},
{
"coordinates": [1128, 1388],
"flag": "granada",
"name": "Emirate of Granada"
},
{
"coordinates": [523, 1156],
"flag": "kingdom_of_portugal",
"name": "Kingdom of Portugal"
},
{
"coordinates": [851, 1805],
"flag": "marinid",
"name": "Marinid Sultanate"
},
{
"coordinates": [1424, 1725],
"flag": "zayyanid",
"name": "Zayyanid Sultanate"
},
{
"coordinates": [1604, 641],
"flag": "armagnac",
"name": "County of Armagnac"
},
{
"coordinates": [946, 1300],
"flag": "cordoba",
"name": "City of Cordoba"
},
{
"coordinates": [740, 1021],
"flag": "leon",
"name": "Kingdom of Leon"
},
{
"coordinates": [1040, 1036],
"flag": "castille",
"name": "Crown of Castile"
},
{
"coordinates": [847, 767],
"flag": "asturias",
"name": "Principality of Asturias"
},
{
"coordinates": [1755, 1130],
"flag": "majorca",
"name": "Kingdom of Majorca"
},
{
"coordinates": [2004, 1630],
"flag": "hafsid",
"name": "Hafsid Sultanate"
},
{
"coordinates": [1374, 926],
"flag": "catalonia",
"name": "Crown of Aragon"
},
{
"coordinates": [1695, 119],
"flag": "paris",
"name": "City of Paris"
},
{
"coordinates": [1121, 221],
"flag": "brittany",
"name": "Kingdom of Brittany"
},
{
"coordinates": [1933, 614],
"flag": "avignon",
"name": "City of Avignon"
},
{
"coordinates": [1434, 129],
"flag": "normandy",
"name": "Duchy of Normandy"
},
{
"coordinates": [1644, 383],
"flag": "Franks",
"name": "Kingdom of France"
},
{
"coordinates": [772, 1399],
"flag": "seville",
"name": "City of Seville"
},
{
"coordinates": [2147, 90],
"flag": "Holy Roman Empire",
"name": "Holy Roman Empire"
}
],
"translation_key": "map.gatewaytotheatlantic"
}