Add Map World for Mobile#3463
Conversation
added folder for world for mobile
Added source map and nation list
added world for mobile
added folder for world for mobile
added rendered map files
added world for mobile
Added world for mobile
removed temporary file
removed temporary file
WalkthroughA new mobile-optimized world map variant called "World for Mobile" is added by introducing map metadata files, registering the map in the application registry, defining a new enum type, and adding translation support across multiple systems. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can enforce grammar and style rules using `languagetool`.Configure the |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/core/game/Game.ts (1)
85-150:⚠️ Potential issue | 🟡 MinorAdd
WorldForMobileto the frequency config insrc/server/MapPlaylist.ts.
WorldForMobileis registered in theGameMapTypeenum and added tomapCategories.continental, but it's missing from thefrequencyobject. Without a frequency entry, it defaults to0and won't appear in random or public playlists. Add a frequency value (for example, next toWorld: 20) to make it selectable in playlists.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/core/game/Game.ts` around lines 85 - 150, The frequency object is missing an entry for GameMapType.WorldForMobile, so although WorldForMobile is defined in GameMapType and included in mapCategories.continental it gets a default frequency of 0 and never appears in playlists; open the frequency map (the exported frequency object used by MapPlaylist) and add an entry for GameMapType.WorldForMobile with an appropriate weight (e.g., the same value as GameMapType.World, such as 20) so it becomes selectable by the random/public playlist logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@resources/maps/worldformobile/manifest.json`:
- Around line 1-508: Prettier is failing on the JSON manifest
(resources/maps/worldformobile/manifest.json — look for the top-level "name":
"World Rotated 90dc" and the "nations" array) because it isn't formatted to
project prettier rules; fix it by running `npx prettier --write
resources/maps/worldformobile/manifest.json`, verify with `npx prettier --check
resources/maps/worldformobile/manifest.json`, then stage and commit the
reformatted manifest before pushing.
---
Outside diff comments:
In `@src/core/game/Game.ts`:
- Around line 85-150: The frequency object is missing an entry for
GameMapType.WorldForMobile, so although WorldForMobile is defined in GameMapType
and included in mapCategories.continental it gets a default frequency of 0 and
never appears in playlists; open the frequency map (the exported frequency
object used by MapPlaylist) and add an entry for GameMapType.WorldForMobile with
an appropriate weight (e.g., the same value as GameMapType.World, such as 20) so
it becomes selectable by the random/public playlist logic.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 95da1c43-7b22-4fe7-ae3a-75d5a52a75eb
⛔ Files ignored due to path filters (4)
map-generator/assets/maps/worldformobile/image.pngis excluded by!**/*.pngresources/maps/worldformobile/map.binis excluded by!**/*.binresources/maps/worldformobile/map16x.binis excluded by!**/*.binresources/maps/worldformobile/map4x.binis excluded by!**/*.bin
📒 Files selected for processing (6)
map-generator/assets/maps/worldformobile/info.jsonmap-generator/main.goresources/lang/en.jsonresources/maps/worldformobile/manifest.jsonresources/maps/worldformobile/thumbnail.webpsrc/core/game/Game.ts
| { | ||
| "map": { | ||
| "height": 2000, | ||
| "num_land_tiles": 651609, | ||
| "width": 1000 | ||
| }, | ||
| "map16x": { | ||
| "height": 500, | ||
| "num_land_tiles": 37591, | ||
| "width": 250 | ||
| }, | ||
| "map4x": { | ||
| "height": 1000, | ||
| "num_land_tiles": 158550, | ||
| "width": 500 | ||
| }, | ||
| "name": "World Rotated 90dc", | ||
| "nations": [ | ||
| { | ||
| "coordinates": [ | ||
| 728, | ||
| 375 | ||
| ], | ||
| "flag": "us", | ||
| "name": "United States" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 864, | ||
| 372 | ||
| ], | ||
| "flag": "ca", | ||
| "name": "Canada" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 626, | ||
| 375 | ||
| ], | ||
| "flag": "mx", | ||
| "name": "Mexico" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 622, | ||
| 500 | ||
| ], | ||
| "flag": "cu", | ||
| "name": "Cuba" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 536, | ||
| 505 | ||
| ], | ||
| "flag": "co", | ||
| "name": "Colombia" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 527, | ||
| 593 | ||
| ], | ||
| "flag": "ve", | ||
| "name": "Venezuela" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 295, | ||
| 596 | ||
| ], | ||
| "flag": "ar", | ||
| "name": "Argentina" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 433, | ||
| 637 | ||
| ], | ||
| "flag": "br", | ||
| "name": "Brazil" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 25, | ||
| 1280 | ||
| ], | ||
| "flag": "aq", | ||
| "name": "Antarctica" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 943, | ||
| 709 | ||
| ], | ||
| "flag": "gl", | ||
| "name": "Greenland" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 888, | ||
| 831 | ||
| ], | ||
| "flag": "is", | ||
| "name": "Iceland" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 814, | ||
| 925 | ||
| ], | ||
| "flag": "gb", | ||
| "name": "United Kingdom" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 817, | ||
| 887 | ||
| ], | ||
| "flag": "ie", | ||
| "name": "Ireland" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 136, | ||
| 908 | ||
| ], | ||
| "flag": "es", | ||
| "name": "Spain" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 750, | ||
| 1004 | ||
| ], | ||
| "flag": "it", | ||
| "name": "Italy" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 780, | ||
| 958 | ||
| ], | ||
| "flag": "fr", | ||
| "name": "France" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 795, | ||
| 997 | ||
| ], | ||
| "flag": "de", | ||
| "name": "Germany" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 899, | ||
| 1064 | ||
| ], | ||
| "flag": "se", | ||
| "name": "Sweden" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 807, | ||
| 1046 | ||
| ], | ||
| "flag": "pl", | ||
| "name": "Poland" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 812, | ||
| 1061 | ||
| ], | ||
| "flag": "by", | ||
| "name": "Belarus" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 757, | ||
| 1073 | ||
| ], | ||
| "flag": "ro", | ||
| "name": "Romania" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 726, | ||
| 1161 | ||
| ], | ||
| "flag": "tr", | ||
| "name": "Turkey" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 867, | ||
| 969 | ||
| ], | ||
| "flag": "no", | ||
| "name": "Norway" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 867, | ||
| 1062 | ||
| ], | ||
| "flag": "fi", | ||
| "name": "Finland" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 789, | ||
| 1099 | ||
| ], | ||
| "flag": "ua", | ||
| "name": "Ukraine" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 864, | ||
| 1344 | ||
| ], | ||
| "flag": "ru", | ||
| "name": "Russia" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 814, | ||
| 1537 | ||
| ], | ||
| "flag": "mn", | ||
| "name": "Mongolia" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 672, | ||
| 1524 | ||
| ], | ||
| "flag": "cn", | ||
| "name": "China" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 627, | ||
| 1368 | ||
| ], | ||
| "flag": "in", | ||
| "name": "India" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 761, | ||
| 1276 | ||
| ], | ||
| "flag": "kz", | ||
| "name": "Kazakhstan" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 691, | ||
| 1238 | ||
| ], | ||
| "flag": "ir", | ||
| "name": "Islamic Republic Of Iran" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 649, | ||
| 1178 | ||
| ], | ||
| "flag": "sa", | ||
| "name": "Saudi Arabia" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 343, | ||
| 1679 | ||
| ], | ||
| "flag": "au", | ||
| "name": "Australia" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 225, | ||
| 1890 | ||
| ], | ||
| "flag": "nz", | ||
| "name": "New Zealand" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 658, | ||
| 918 | ||
| ], | ||
| "flag": "dz", | ||
| "name": "Algeria" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 668, | ||
| 1030 | ||
| ], | ||
| "flag": "ly", | ||
| "name": "Libyan Arab Jamahiriya" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 665, | ||
| 1092 | ||
| ], | ||
| "flag": "eg", | ||
| "name": "Egypt" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 590, | ||
| 963 | ||
| ], | ||
| "flag": "ne", | ||
| "name": "Niger" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 594, | ||
| 1112 | ||
| ], | ||
| "flag": "sd", | ||
| "name": "Sudan" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 492, | ||
| 1074 | ||
| ], | ||
| "flag": "cd", | ||
| "name": "DR Congo" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 557, | ||
| 1154 | ||
| ], | ||
| "flag": "et", | ||
| "name": "Ethiopia" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 293, | ||
| 1075 | ||
| ], | ||
| "flag": "za", | ||
| "name": "South Africa" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 373, | ||
| 1194 | ||
| ], | ||
| "flag": "mg", | ||
| "name": "Madagascar" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 580, | ||
| 1052 | ||
| ], | ||
| "flag": "td", | ||
| "name": "Chad" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 335, | ||
| 1030 | ||
| ], | ||
| "flag": "na", | ||
| "name": "Namibia" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 535, | ||
| 1632 | ||
| ], | ||
| "flag": "ph", | ||
| "name": "Philippines" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 574, | ||
| 1537 | ||
| ], | ||
| "flag": "th", | ||
| "name": "Thailand" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 636, | ||
| 1610 | ||
| ], | ||
| "flag": "tw", | ||
| "name": "Taiwan" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 710, | ||
| 1710 | ||
| ], | ||
| "flag": "jp", | ||
| "name": "Japan" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 881, | ||
| 1869 | ||
| ], | ||
| "flag": "ru", | ||
| "name": "Siberia" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 883, | ||
| 74 | ||
| ], | ||
| "flag": "polar_bears", | ||
| "name": "Polar Bears" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 25, | ||
| 419 | ||
| ], | ||
| "flag": "aq", | ||
| "name": "West Antarctica" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 393, | ||
| 542 | ||
| ], | ||
| "flag": "pe", | ||
| "name": "Peru" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 385, | ||
| 1075 | ||
| ], | ||
| "flag": "zm", | ||
| "name": "Zambia" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 835, | ||
| 1099 | ||
| ], | ||
| "flag": "lv", | ||
| "name": "Latvia" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 664, | ||
| 1427 | ||
| ], | ||
| "flag": "bt", | ||
| "name": "Bhutan" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 476, | ||
| 1511 | ||
| ], | ||
| "flag": "id", | ||
| "name": "Indonesia" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 33, | ||
| 1809 | ||
| ], | ||
| "flag": "aq", | ||
| "name": "East Antarctica" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 618, | ||
| 1255 | ||
| ], | ||
| "flag": "om", | ||
| "name": "Oman" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 627, | ||
| 853 | ||
| ], | ||
| "flag": "ma", | ||
| "name": "Morocco" | ||
| }, | ||
| { | ||
| "coordinates": [ | ||
| 322, | ||
| 656 | ||
| ], | ||
| "flag": "uy", | ||
| "name": "Uruguay" | ||
| } | ||
| ] | ||
| } No newline at end of file |
There was a problem hiding this comment.
CI blocker: this manifest still fails Prettier.
The pipeline reports formatting issues for this file. Please run:
npx prettier --write resources/maps/worldformobile/manifest.json
before merge.
🧰 Tools
🪛 GitHub Actions: 🧪 CI
[warning] 1-1: Prettier formatting issues detected. Run 'npx prettier --write resources/maps/worldformobile/manifest.json' to fix.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@resources/maps/worldformobile/manifest.json` around lines 1 - 508, Prettier
is failing on the JSON manifest (resources/maps/worldformobile/manifest.json —
look for the top-level "name": "World Rotated 90dc" and the "nations" array)
because it isn't formatted to project prettier rules; fix it by running `npx
prettier --write resources/maps/worldformobile/manifest.json`, verify with `npx
prettier --check resources/maps/worldformobile/manifest.json`, then stage and
commit the reformatted manifest before pushing.
Description:
Add map World for Mobile (World Map Rotated) for April Fools update.
This is a simple edit to the existing World map.
https://discord.com/channels/1284581928254701718/1483786939332169830/1483786989315817544
Discord username
PlaysBadly