mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-11 02:34:14 +00:00
3de5fb4204
**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>
337 lines
6.1 KiB
JSON
337 lines
6.1 KiB
JSON
{
|
|
"additionalNations": [
|
|
{
|
|
"coordinates": [288, 985],
|
|
"flag": "it",
|
|
"name": "Abruzzo"
|
|
},
|
|
{
|
|
"coordinates": [1686, 1547],
|
|
"flag": "tr",
|
|
"name": "Aegean Region"
|
|
},
|
|
{
|
|
"coordinates": [561, 1236],
|
|
"flag": "it",
|
|
"name": "Apulia"
|
|
},
|
|
{
|
|
"coordinates": [1203, 1538],
|
|
"flag": "gr",
|
|
"name": "Attica"
|
|
},
|
|
{
|
|
"coordinates": [1043, 388],
|
|
"flag": "ro",
|
|
"name": "Banat"
|
|
},
|
|
{
|
|
"coordinates": [326, 1201],
|
|
"flag": "it",
|
|
"name": "Basilicata"
|
|
},
|
|
{
|
|
"coordinates": [881, 519],
|
|
"flag": "rs",
|
|
"name": "Belgrade"
|
|
},
|
|
{
|
|
"coordinates": [319, 1489],
|
|
"flag": "it",
|
|
"name": "Calabria"
|
|
},
|
|
{
|
|
"coordinates": [124, 1109],
|
|
"flag": "it",
|
|
"name": "Campania"
|
|
},
|
|
{
|
|
"coordinates": [1236, 1116],
|
|
"flag": "gr",
|
|
"name": "Central Macedonia"
|
|
},
|
|
{
|
|
"coordinates": [1375, 2005],
|
|
"flag": "gr",
|
|
"name": "Crete"
|
|
},
|
|
{
|
|
"coordinates": [1062, 52],
|
|
"flag": "ro",
|
|
"name": "Crisana"
|
|
},
|
|
{
|
|
"coordinates": [323, 652],
|
|
"flag": "ua",
|
|
"name": "Dalmatia"
|
|
},
|
|
{
|
|
"coordinates": [1818, 432],
|
|
"flag": "ro",
|
|
"name": "Dobrogea"
|
|
},
|
|
{
|
|
"coordinates": [823, 1305],
|
|
"flag": "gr",
|
|
"name": "Epirus"
|
|
},
|
|
{
|
|
"coordinates": [1417, 963],
|
|
"flag": "bg",
|
|
"name": "Haskovo"
|
|
},
|
|
{
|
|
"coordinates": [554, 746],
|
|
"flag": "ba",
|
|
"name": "Herzegovina"
|
|
},
|
|
{
|
|
"coordinates": [851, 1541],
|
|
"flag": "gr",
|
|
"name": "Ionian Islands"
|
|
},
|
|
{
|
|
"coordinates": [47, 409],
|
|
"flag": "hr",
|
|
"name": "Istria"
|
|
},
|
|
{
|
|
"coordinates": [1255, 713],
|
|
"flag": "bg",
|
|
"name": "Lovech"
|
|
},
|
|
{
|
|
"coordinates": [1837, 1236],
|
|
"flag": "tr",
|
|
"name": "Marmara"
|
|
},
|
|
{
|
|
"coordinates": [1936, 1732],
|
|
"flag": "tr",
|
|
"name": "Mediterranean Region"
|
|
},
|
|
{
|
|
"coordinates": [1578, 87],
|
|
"flag": "Principality of Moldavia",
|
|
"name": "Moldavia"
|
|
},
|
|
{
|
|
"coordinates": [1065, 605],
|
|
"flag": "bg",
|
|
"name": "Montana"
|
|
},
|
|
{
|
|
"coordinates": [1587, 482],
|
|
"flag": "ro",
|
|
"name": "Muntenia"
|
|
},
|
|
{
|
|
"coordinates": [1493, 1387],
|
|
"flag": "gr",
|
|
"name": "North Aegean"
|
|
},
|
|
{
|
|
"coordinates": [1263, 494],
|
|
"flag": "ro",
|
|
"name": "Oltenia"
|
|
},
|
|
{
|
|
"coordinates": [1042, 1644],
|
|
"flag": "gr",
|
|
"name": "Peloponnese"
|
|
},
|
|
{
|
|
"coordinates": [1257, 936],
|
|
"flag": "bg",
|
|
"name": "Plovdiv"
|
|
},
|
|
{
|
|
"coordinates": [1509, 692],
|
|
"flag": "bg",
|
|
"name": "Razgrad"
|
|
},
|
|
{
|
|
"coordinates": [590, 386],
|
|
"flag": "Slavonia",
|
|
"name": "Slavonia"
|
|
},
|
|
{
|
|
"coordinates": [1134, 882],
|
|
"flag": "bg",
|
|
"name": "Sofia"
|
|
},
|
|
{
|
|
"coordinates": [1432, 1718],
|
|
"flag": "gr",
|
|
"name": "South Aegean"
|
|
},
|
|
{
|
|
"coordinates": [1015, 1259],
|
|
"flag": "gr",
|
|
"name": "Thessaly"
|
|
},
|
|
{
|
|
"coordinates": [1659, 1042],
|
|
"flag": "tr",
|
|
"name": "Thrace"
|
|
},
|
|
{
|
|
"coordinates": [402, 173],
|
|
"flag": "hu",
|
|
"name": "Transdanubia"
|
|
},
|
|
{
|
|
"coordinates": [1729, 622],
|
|
"flag": "bg",
|
|
"name": "Varna"
|
|
},
|
|
{
|
|
"coordinates": [946, 1556],
|
|
"flag": "gr",
|
|
"name": "Western Greece"
|
|
},
|
|
{
|
|
"coordinates": [1003, 1130],
|
|
"flag": "gr",
|
|
"name": "Western Macedonia"
|
|
}
|
|
],
|
|
"categories": ["europe"],
|
|
"id": "Balkans",
|
|
"map": {
|
|
"height": 2048,
|
|
"num_land_tiles": 2478822,
|
|
"width": 2048
|
|
},
|
|
"map16x": {
|
|
"height": 512,
|
|
"num_land_tiles": 148761,
|
|
"width": 512
|
|
},
|
|
"map4x": {
|
|
"height": 1024,
|
|
"num_land_tiles": 610636,
|
|
"width": 1024
|
|
},
|
|
"multiplayer_frequency": 6,
|
|
"name": "Balkans",
|
|
"nations": [
|
|
{
|
|
"coordinates": [122, 281],
|
|
"flag": "si",
|
|
"name": "Slovenia"
|
|
},
|
|
{
|
|
"coordinates": [106, 41],
|
|
"flag": "at",
|
|
"name": "Austria"
|
|
},
|
|
{
|
|
"coordinates": [606, 124],
|
|
"flag": "hu",
|
|
"name": "Hungary"
|
|
},
|
|
{
|
|
"coordinates": [307, 431],
|
|
"flag": "hr",
|
|
"name": "Croatia"
|
|
},
|
|
{
|
|
"coordinates": [115, 1895],
|
|
"flag": "mt",
|
|
"name": "Malta"
|
|
},
|
|
{
|
|
"coordinates": [578, 552],
|
|
"flag": "ba",
|
|
"name": "Bosnia and Herzegovina"
|
|
},
|
|
{
|
|
"coordinates": [831, 372],
|
|
"flag": "Vojvodina",
|
|
"name": "Vojvodina"
|
|
},
|
|
{
|
|
"coordinates": [956, 667],
|
|
"flag": "rs",
|
|
"name": "Serbia"
|
|
},
|
|
{
|
|
"coordinates": [783, 1101],
|
|
"flag": "al",
|
|
"name": "Albania"
|
|
},
|
|
{
|
|
"coordinates": [736, 860],
|
|
"flag": "me",
|
|
"name": "Montenegro"
|
|
},
|
|
{
|
|
"coordinates": [33, 896],
|
|
"flag": "it",
|
|
"name": "Italy"
|
|
},
|
|
{
|
|
"coordinates": [1001, 1390],
|
|
"flag": "gr",
|
|
"name": "Greece"
|
|
},
|
|
{
|
|
"coordinates": [994, 969],
|
|
"flag": "mk",
|
|
"name": "North Macedonia"
|
|
},
|
|
{
|
|
"coordinates": [1546, 839],
|
|
"flag": "bg",
|
|
"name": "Bulgaria"
|
|
},
|
|
{
|
|
"coordinates": [1953, 1443],
|
|
"flag": "tr",
|
|
"name": "Türkiye"
|
|
},
|
|
{
|
|
"coordinates": [1786, 36],
|
|
"flag": "md",
|
|
"name": "Moldova"
|
|
},
|
|
{
|
|
"coordinates": [1538, 264],
|
|
"flag": "ro",
|
|
"name": "Romania"
|
|
},
|
|
{
|
|
"coordinates": [2004, 283],
|
|
"flag": "ua",
|
|
"name": "Ukraine"
|
|
},
|
|
{
|
|
"coordinates": [926, 853],
|
|
"flag": "xk",
|
|
"name": "Kosovo"
|
|
},
|
|
{
|
|
"coordinates": [1356, 157],
|
|
"flag": "Transylvania",
|
|
"name": "Transylvania"
|
|
},
|
|
{
|
|
"coordinates": [730, 666],
|
|
"flag": "Republika Srpska",
|
|
"name": "Republika Srpska"
|
|
},
|
|
{
|
|
"coordinates": [1948, 80],
|
|
"flag": "Moldavian SSR",
|
|
"name": "Transnistria"
|
|
},
|
|
{
|
|
"coordinates": [79, 1635],
|
|
"flag": "Sicily",
|
|
"name": "Sicily"
|
|
}
|
|
],
|
|
"translation_key": "map.balkans"
|
|
}
|