Files
OpenFrontIO/map-generator/assets/maps/juandefucastrait/info.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

334 lines
6.5 KiB
JSON

{
"id": "JuanDeFucaStrait",
"name": "Juan De Fuca Strait",
"translation_key": "map.juandefucastrait",
"categories": ["north_america"],
"multiplayer_frequency": 4,
"nations": [
{
"coordinates": [1812, 445],
"name": "Victoria",
"flag": "britishcolumbia"
},
{
"coordinates": [1519, 512],
"name": "Sooke",
"flag": "britishcolumbia"
},
{
"coordinates": [1016, 319],
"name": "Port Renfrew",
"flag": "britishcolumbia"
},
{
"coordinates": [366, 11],
"name": "Bamfield",
"flag": "britishcolumbia"
},
{
"coordinates": [1742, 165],
"name": "Sidney",
"flag": "britishcolumbia"
},
{
"coordinates": [2065, 346],
"name": "Friday Harbor",
"flag": "Washington"
},
{
"coordinates": [2532, 77],
"name": "Bellingham",
"flag": "Washington"
},
{
"coordinates": [1762, 867],
"name": "Port Angeles",
"flag": "Washington"
},
{
"coordinates": [749, 556],
"name": "Neah Bay",
"flag": "Washington"
},
{
"coordinates": [1003, 1014],
"name": "Forks",
"flag": "Washington"
},
{
"coordinates": [2747, 992],
"name": "Everett",
"flag": "Washington"
},
{
"coordinates": [2402, 389],
"name": "Anacortes",
"flag": "Washington"
},
{
"coordinates": [2654, 479],
"name": "Mount Vermon",
"flag": "Washington"
},
{
"coordinates": [2407, 615],
"name": "Oak Harbor",
"flag": "Washington"
},
{
"coordinates": [2280, 850],
"name": "Port Townsend",
"flag": "Washington"
},
{
"coordinates": [2764, 714],
"name": "Arlington",
"flag": "Washington"
}
],
"additionalNations": [
{
"coordinates": [2654, 216],
"name": "Alger",
"flag": "Washington"
},
{
"coordinates": [2741, 530],
"name": "Big Lake",
"flag": "Washington"
},
{
"coordinates": [2093, 1000],
"name": "Blyn",
"flag": "Washington"
},
{
"coordinates": [2580, 301],
"name": "Bow",
"flag": "Washington"
},
{
"coordinates": [2648, 377],
"name": "Burlington",
"flag": "Washington"
},
{
"coordinates": [1903, 924],
"name": "Carlsborg",
"flag": "Washington"
},
{
"coordinates": [1117, 9],
"name": "Caycuse",
"flag": "britishcolumbia"
},
{
"coordinates": [1020, 714],
"name": "Clallam Bay",
"flag": "Washington"
},
{
"coordinates": [1666, 525],
"name": "Colwood",
"flag": "britishcolumbia"
},
{
"coordinates": [1773, 338],
"name": "Cordova Bay",
"flag": "britishcolumbia"
},
{
"coordinates": [2399, 748],
"name": "Coupeville",
"flag": "Washington"
},
{
"coordinates": [1578, 154],
"name": "Cowichan Bay",
"flag": "Washington"
},
{
"coordinates": [2175, 1060],
"name": "Discovery Bay",
"flag": "Washington"
},
{
"coordinates": [1533, 41],
"name": "Duncan",
"flag": "britishcolumbia"
},
{
"coordinates": [1977, 833],
"name": "Dungeness",
"flag": "Washington"
},
{
"coordinates": [2184, 137],
"name": "Eastsound",
"flag": "Washington"
},
{
"coordinates": [1646, 910],
"name": "Elwha",
"flag": "Washington"
},
{
"coordinates": [2450, 944],
"name": "Freeland",
"flag": "Washington"
},
{
"coordinates": [1725, 43],
"name": "Fulford Harbour",
"flag": "britishcolumbia"
},
{
"coordinates": [2908, 338],
"name": "Hamilton",
"flag": "Washington"
},
{
"coordinates": [1241, 58],
"name": "Honeymoon Bay",
"flag": "britishcolumbia"
},
{
"coordinates": [1258, 462],
"name": "Jordan River",
"flag": "britishcolumbia"
},
{
"coordinates": [1380, 813],
"name": "Joyce",
"flag": "Washington"
},
{
"coordinates": [1360, 43],
"name": "Lake Cowichan",
"flag": "britishcolumbia"
},
{
"coordinates": [2886, 977],
"name": "Lake Stevens",
"flag": "Washington"
},
{
"coordinates": [1632, 420],
"name": "Langford",
"flag": "britishcolumbia"
},
{
"coordinates": [2577, 975],
"name": "Langley",
"flag": "Washington"
},
{
"coordinates": [2184, 366],
"name": "Lopez",
"flag": "Washington"
},
{
"coordinates": [1581, 844],
"name": "Lower Elwha",
"flag": "Washington"
},
{
"coordinates": [2455, 1],
"name": "Marietta-Alderwood",
"flag": "Washington"
},
{
"coordinates": [2739, 887],
"name": "Marysville",
"flag": "Washington"
},
{
"coordinates": [1635, 222],
"name": "Mill Bay",
"flag": "Washington"
},
{
"coordinates": [893, 760],
"name": "Old Royal",
"flag": "Washington"
},
{
"coordinates": [1496, 1082],
"name": "Olympic National Park",
"flag": "Washington"
},
{
"coordinates": [737, 816],
"name": "Ozette",
"flag": "Washington"
},
{
"coordinates": [2320, 1037],
"name": "Port Hadlock-Irondale",
"flag": "Washington"
},
{
"coordinates": [1182, 777],
"name": "Pysht",
"flag": "Washington"
},
{
"coordinates": [842, 983],
"name": "Quillayute",
"flag": "Washington"
},
{
"coordinates": [1997, 256],
"name": "Roche Harbor",
"flag": "Washington"
},
{
"coordinates": [1060, 836],
"name": "Sappho",
"flag": "Washington"
},
{
"coordinates": [2750, 358],
"name": "Sedro-Woolley",
"flag": "Washington"
},
{
"coordinates": [2025, 972],
"name": "Sequim",
"flag": "Washington"
},
{
"coordinates": [967, 915],
"name": "Shuwah",
"flag": "Washington"
},
{
"coordinates": [2605, 123],
"name": "Sudden Valley",
"flag": "Washington"
}
],
"teamGameSpawnAreas": {
"3": [
{
"height": 550,
"width": 2360,
"x": 0,
"y": 0
},
{
"height": 550,
"width": 2360,
"x": 0,
"y": 550
},
{
"height": 1100,
"width": 640,
"x": 2360,
"y": 0
}
]
}
}