mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 06:10:42 +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>
545 lines
10 KiB
JSON
545 lines
10 KiB
JSON
{
|
|
"id": "GiantWorldMap",
|
|
"name": "Giant World Map",
|
|
"translation_key": "map.giantworldmap",
|
|
"categories": ["world"],
|
|
"multiplayer_frequency": 0,
|
|
"nations": [
|
|
{
|
|
"coordinates": [2309, 535],
|
|
"name": "Türkiye",
|
|
"flag": "tr"
|
|
},
|
|
{
|
|
"coordinates": [2050, 395],
|
|
"name": "Germany",
|
|
"flag": "de"
|
|
},
|
|
{
|
|
"coordinates": [1966, 442],
|
|
"name": "France",
|
|
"flag": "fr"
|
|
},
|
|
{
|
|
"coordinates": [1872, 528],
|
|
"name": "Spain",
|
|
"flag": "es"
|
|
},
|
|
{
|
|
"coordinates": [2074, 498],
|
|
"name": "Italy",
|
|
"flag": "it"
|
|
},
|
|
{
|
|
"coordinates": [1912, 379],
|
|
"name": "United Kingdom",
|
|
"flag": "gb"
|
|
},
|
|
{
|
|
"coordinates": [1841, 373],
|
|
"name": "Ireland",
|
|
"flag": "ie"
|
|
},
|
|
{
|
|
"coordinates": [2153, 378],
|
|
"name": "Poland",
|
|
"flag": "pl"
|
|
},
|
|
{
|
|
"coordinates": [2178, 539],
|
|
"name": "Greece",
|
|
"flag": "gr"
|
|
},
|
|
{
|
|
"coordinates": [2222, 493],
|
|
"name": "Bulgaria",
|
|
"flag": "bg"
|
|
},
|
|
{
|
|
"coordinates": [2135, 481],
|
|
"name": "Serbia",
|
|
"flag": "rs"
|
|
},
|
|
{
|
|
"coordinates": [2242, 461],
|
|
"name": "Romania",
|
|
"flag": "ro"
|
|
},
|
|
{
|
|
"coordinates": [2163, 441],
|
|
"name": "Hungary",
|
|
"flag": "hu"
|
|
},
|
|
{
|
|
"coordinates": [2272, 418],
|
|
"name": "Ukraine",
|
|
"flag": "ua"
|
|
},
|
|
{
|
|
"coordinates": [2093, 297],
|
|
"name": "Sweden",
|
|
"flag": "se"
|
|
},
|
|
{
|
|
"coordinates": [2027, 282],
|
|
"name": "Norway",
|
|
"flag": "no"
|
|
},
|
|
{
|
|
"coordinates": [2191, 194],
|
|
"name": "Sápmi",
|
|
"flag": "Sami flag"
|
|
},
|
|
{
|
|
"coordinates": [2206, 262],
|
|
"name": "Finland",
|
|
"flag": "fi"
|
|
},
|
|
{
|
|
"coordinates": [2376, 363],
|
|
"name": "Russia",
|
|
"flag": "ru"
|
|
},
|
|
{
|
|
"coordinates": [2222, 371],
|
|
"name": "Belarus",
|
|
"flag": "by"
|
|
},
|
|
{
|
|
"coordinates": [2441, 507],
|
|
"name": "Georgia",
|
|
"flag": "ge"
|
|
},
|
|
{
|
|
"coordinates": [2402, 580],
|
|
"name": "Iraq",
|
|
"flag": "iq"
|
|
},
|
|
{
|
|
"coordinates": [2353, 595],
|
|
"name": "Syria",
|
|
"flag": "sy"
|
|
},
|
|
{
|
|
"coordinates": [2414, 679],
|
|
"name": "Saudi Arabia",
|
|
"flag": "sa"
|
|
},
|
|
{
|
|
"coordinates": [2456, 820],
|
|
"name": "Yemen",
|
|
"flag": "ye"
|
|
},
|
|
{
|
|
"coordinates": [2554, 724],
|
|
"name": "United Arab Emirates",
|
|
"flag": "ae"
|
|
},
|
|
{
|
|
"coordinates": [2532, 609],
|
|
"name": "Iran",
|
|
"flag": "ir"
|
|
},
|
|
{
|
|
"coordinates": [2683, 650],
|
|
"name": "Pakistan",
|
|
"flag": "pk"
|
|
},
|
|
{
|
|
"coordinates": [2654, 580],
|
|
"name": "Afghanistan",
|
|
"flag": "af"
|
|
},
|
|
{
|
|
"coordinates": [2727, 416],
|
|
"name": "Kazakhstan",
|
|
"flag": "kz"
|
|
},
|
|
{
|
|
"coordinates": [2556, 544],
|
|
"name": "Turkmenistan",
|
|
"flag": "tm"
|
|
},
|
|
{
|
|
"coordinates": [3255, 278],
|
|
"name": "Siberia",
|
|
"flag": "Siberia"
|
|
},
|
|
{
|
|
"coordinates": [2810, 744],
|
|
"name": "India",
|
|
"flag": "in"
|
|
},
|
|
{
|
|
"coordinates": [1717, 237],
|
|
"name": "Iceland",
|
|
"flag": "is"
|
|
},
|
|
{
|
|
"coordinates": [2944, 709],
|
|
"name": "Bangladesh",
|
|
"flag": "bd"
|
|
},
|
|
{
|
|
"coordinates": [2870, 656],
|
|
"name": "Nepal",
|
|
"flag": "np"
|
|
},
|
|
{
|
|
"coordinates": [3172, 624],
|
|
"name": "China",
|
|
"flag": "cn"
|
|
},
|
|
{
|
|
"coordinates": [3373, 521],
|
|
"name": "North Korea",
|
|
"flag": "kp"
|
|
},
|
|
{
|
|
"coordinates": [3389, 573],
|
|
"name": "South Korea",
|
|
"flag": "kr"
|
|
},
|
|
{
|
|
"coordinates": [3515, 571],
|
|
"name": "Japan",
|
|
"flag": "jp"
|
|
},
|
|
{
|
|
"coordinates": [3026, 457],
|
|
"name": "Mongolia",
|
|
"flag": "mn"
|
|
},
|
|
{
|
|
"coordinates": [3229, 995],
|
|
"name": "Indonesia",
|
|
"flag": "id"
|
|
},
|
|
{
|
|
"coordinates": [3145, 802],
|
|
"name": "Vietnam",
|
|
"flag": "vn"
|
|
},
|
|
{
|
|
"coordinates": [3020, 750],
|
|
"name": "Myanmar",
|
|
"flag": "mm"
|
|
},
|
|
{
|
|
"coordinates": [3082, 822],
|
|
"name": "Thailand",
|
|
"flag": "th"
|
|
},
|
|
{
|
|
"coordinates": [3538, 1067],
|
|
"name": "Papua New Guinea",
|
|
"flag": "pg"
|
|
},
|
|
{
|
|
"coordinates": [3570, 1392],
|
|
"name": "Australia",
|
|
"flag": "au"
|
|
},
|
|
{
|
|
"coordinates": [3416, 1213],
|
|
"name": "Nawan-mirri",
|
|
"flag": "Australian Aboriginal Flag"
|
|
},
|
|
{
|
|
"coordinates": [3880, 1521],
|
|
"name": "New Zealand",
|
|
"flag": "nz"
|
|
},
|
|
{
|
|
"coordinates": [2632, 1893],
|
|
"name": "Antarctica",
|
|
"flag": "aq"
|
|
},
|
|
{
|
|
"coordinates": [2038, 590],
|
|
"name": "Tunisia",
|
|
"flag": "tn"
|
|
},
|
|
{
|
|
"coordinates": [2138, 675],
|
|
"name": "Libya",
|
|
"flag": "ly"
|
|
},
|
|
{
|
|
"coordinates": [2281, 653],
|
|
"name": "Egypt",
|
|
"flag": "eg"
|
|
},
|
|
{
|
|
"coordinates": [1859, 613],
|
|
"name": "Morocco",
|
|
"flag": "ma"
|
|
},
|
|
{
|
|
"coordinates": [1952, 671],
|
|
"name": "Algeria",
|
|
"flag": "dz"
|
|
},
|
|
{
|
|
"coordinates": [2271, 788],
|
|
"name": "Sudan",
|
|
"flag": "sd"
|
|
},
|
|
{
|
|
"coordinates": [2466, 918],
|
|
"name": "Somalia",
|
|
"flag": "so"
|
|
},
|
|
{
|
|
"coordinates": [2352, 895],
|
|
"name": "Ethiopia",
|
|
"flag": "et"
|
|
},
|
|
{
|
|
"coordinates": [1790, 729],
|
|
"name": "Mauritania",
|
|
"flag": "mr"
|
|
},
|
|
{
|
|
"coordinates": [2118, 768],
|
|
"name": "Chad",
|
|
"flag": "td"
|
|
},
|
|
{
|
|
"coordinates": [2009, 810],
|
|
"name": "Niger",
|
|
"flag": "ne"
|
|
},
|
|
{
|
|
"coordinates": [1996, 909],
|
|
"name": "Nigeria",
|
|
"flag": "ng"
|
|
},
|
|
{
|
|
"coordinates": [1805, 907],
|
|
"name": "Liberia",
|
|
"flag": "lr"
|
|
},
|
|
{
|
|
"coordinates": [2195, 918],
|
|
"name": "Central African Republic",
|
|
"flag": "cf"
|
|
},
|
|
{
|
|
"coordinates": [2197, 1070],
|
|
"name": "DR Congo",
|
|
"flag": "cd"
|
|
},
|
|
{
|
|
"coordinates": [2211, 1389],
|
|
"name": "South Africa",
|
|
"flag": "za"
|
|
},
|
|
{
|
|
"coordinates": [2452, 1247],
|
|
"name": "Madagascar",
|
|
"flag": "mg"
|
|
},
|
|
{
|
|
"coordinates": [2356, 1165],
|
|
"name": "Mozambique",
|
|
"flag": "mz"
|
|
},
|
|
{
|
|
"coordinates": [2368, 1032],
|
|
"name": "Tanzania",
|
|
"flag": "tz"
|
|
},
|
|
{
|
|
"coordinates": [1894, 789],
|
|
"name": "Mali",
|
|
"flag": "ml"
|
|
},
|
|
{
|
|
"coordinates": [2128, 1292],
|
|
"name": "Namibia",
|
|
"flag": "na"
|
|
},
|
|
{
|
|
"coordinates": [2099, 1178],
|
|
"name": "Angola",
|
|
"flag": "ao"
|
|
},
|
|
{
|
|
"coordinates": [1418, 1167],
|
|
"name": "Brazil",
|
|
"flag": "br"
|
|
},
|
|
{
|
|
"coordinates": [1225, 1065],
|
|
"name": "Amazonas",
|
|
"flag": "amazonas"
|
|
},
|
|
{
|
|
"coordinates": [1243, 1428],
|
|
"name": "Argentina",
|
|
"flag": "ar"
|
|
},
|
|
{
|
|
"coordinates": [1125, 1356],
|
|
"name": "Chile",
|
|
"flag": "cl"
|
|
},
|
|
{
|
|
"coordinates": [1064, 1111],
|
|
"name": "Peru",
|
|
"flag": "pe"
|
|
},
|
|
{
|
|
"coordinates": [1083, 938],
|
|
"name": "Colombia",
|
|
"flag": "co"
|
|
},
|
|
{
|
|
"coordinates": [1183, 921],
|
|
"name": "Venezuela",
|
|
"flag": "ve"
|
|
},
|
|
{
|
|
"coordinates": [913, 833],
|
|
"name": "Nicaragua",
|
|
"flag": "ni"
|
|
},
|
|
{
|
|
"coordinates": [764, 743],
|
|
"name": "Mexico",
|
|
"flag": "mx"
|
|
},
|
|
{
|
|
"coordinates": [1034, 556],
|
|
"name": "United States",
|
|
"flag": "us"
|
|
},
|
|
{
|
|
"coordinates": [766, 623],
|
|
"name": "Texas",
|
|
"flag": "Texas"
|
|
},
|
|
{
|
|
"coordinates": [551, 564],
|
|
"name": "California",
|
|
"flag": "California"
|
|
},
|
|
{
|
|
"coordinates": [654, 530],
|
|
"name": "Utah",
|
|
"flag": "Utah"
|
|
},
|
|
{
|
|
"coordinates": [1079, 385],
|
|
"name": "Quebec",
|
|
"flag": "Quebec"
|
|
},
|
|
{
|
|
"coordinates": [1211, 364],
|
|
"name": "Newfoundland and Labrador",
|
|
"flag": "newfoundlandandlabrador"
|
|
},
|
|
{
|
|
"coordinates": [957, 406],
|
|
"name": "Canada",
|
|
"flag": "ca"
|
|
},
|
|
{
|
|
"coordinates": [170, 244],
|
|
"name": "Alaska",
|
|
"flag": "Alaska"
|
|
},
|
|
{
|
|
"coordinates": [857, 232],
|
|
"name": "Nunavut",
|
|
"flag": "Nunavut"
|
|
},
|
|
{
|
|
"coordinates": [475, 254],
|
|
"name": "Yukon",
|
|
"flag": "Yukon"
|
|
},
|
|
{
|
|
"coordinates": [1448, 137],
|
|
"name": "Greenland",
|
|
"flag": "gl"
|
|
},
|
|
{
|
|
"coordinates": [2247, 1229],
|
|
"name": "Zimbabwe",
|
|
"flag": "zw"
|
|
},
|
|
{
|
|
"coordinates": [550, 438],
|
|
"name": "Washington",
|
|
"flag": "Washington"
|
|
},
|
|
{
|
|
"coordinates": [778, 518],
|
|
"name": "Kansas",
|
|
"flag": "Kansas"
|
|
},
|
|
{
|
|
"coordinates": [912, 613],
|
|
"name": "Mississippi",
|
|
"flag": "Mississippi"
|
|
},
|
|
{
|
|
"coordinates": [1208, 1219],
|
|
"name": "Bolivia",
|
|
"flag": "bo"
|
|
},
|
|
{
|
|
"coordinates": [2059, 1015],
|
|
"name": "Gabon",
|
|
"flag": "ga"
|
|
},
|
|
{
|
|
"coordinates": [689, 437],
|
|
"name": "Montana",
|
|
"flag": "Montana"
|
|
},
|
|
{
|
|
"coordinates": [517, 357],
|
|
"name": "British Columbia",
|
|
"flag": "britishcolumbia"
|
|
},
|
|
{
|
|
"coordinates": [618, 358],
|
|
"name": "Alberta",
|
|
"flag": "alberta"
|
|
},
|
|
{
|
|
"coordinates": [732, 360],
|
|
"name": "Saskatchewan",
|
|
"flag": "saskatchewan"
|
|
},
|
|
{
|
|
"coordinates": [834, 367],
|
|
"name": "Manitoba",
|
|
"flag": "manitoba"
|
|
},
|
|
{
|
|
"coordinates": [1108, 500],
|
|
"name": "Massachusetts",
|
|
"flag": "Massachusetts"
|
|
},
|
|
{
|
|
"coordinates": [845, 465],
|
|
"name": "Minnesota",
|
|
"flag": "Minnesota"
|
|
},
|
|
{
|
|
"coordinates": [960, 500],
|
|
"name": "Michigan",
|
|
"flag": "Michigan"
|
|
},
|
|
{
|
|
"coordinates": [655, 247],
|
|
"name": "Northwest Territories",
|
|
"flag": "northwestterritories"
|
|
}
|
|
]
|
|
}
|