Skip to content

Add Map World for Mobile#3463

Open
patrickbadly-hub wants to merge 11 commits intoopenfrontio:mainfrom
patrickbadly-hub:Add-Map---World-for-Mobile
Open

Add Map World for Mobile#3463
patrickbadly-hub wants to merge 11 commits intoopenfrontio:mainfrom
patrickbadly-hub:Add-Map---World-for-Mobile

Conversation

@patrickbadly-hub
Copy link

@patrickbadly-hub patrickbadly-hub commented Mar 18, 2026

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

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
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 062c1f6e-6e77-4b4e-a346-aef34f19e076

📥 Commits

Reviewing files that changed from the base of the PR and between 1789a43 and 54a5fac.

📒 Files selected for processing (3)
  • map-generator/main.go
  • resources/lang/en.json
  • src/core/game/Game.ts
✅ Files skipped from review due to trivial changes (3)
  • map-generator/main.go
  • resources/lang/en.json
  • src/core/game/Game.ts

Walkthrough

Adds a new mobile-optimized world map variant by adding map metadata and manifest files, registering the map in the map-generator, adding a translation key, and extending the GameMapType enum and continental category.

Changes

Cohort / File(s) Summary
Mobile World Map Assets
map-generator/assets/maps/worldformobile/info.json, resources/maps/worldformobile/manifest.json
Introduces new map metadata and manifest for the mobile world variant (map name, nations with coordinates, flags, and land tile configs).
Map Registry
map-generator/main.go
Registers the worldformobile map in the map registry so it is processed with other maps.
Game Types
src/core/game/Game.ts
Adds GameMapType.WorldForMobile enum member and includes it in the mapCategories.continental list.
Localization
resources/lang/en.json
Adds translation key map.worldformobile ("World for Mobile").

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🌍 A world turned for a smaller view,
Tiny flags and names in neat queue,
Metadata mapped, the manifest sings,
Registered, translated — ready for wings,
A mobile globe to carry you. 📱

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add Map World for Mobile' clearly describes the main change: adding a new map variant to the codebase.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose of adding the World for Mobile map and referencing an April Fools update context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 | 🟡 Minor

Add WorldForMobile to the frequency config in src/server/MapPlaylist.ts.

WorldForMobile is registered in the GameMapType enum and added to mapCategories.continental, but it's missing from the frequency object. Without a frequency entry, it defaults to 0 and won't appear in random or public playlists. Add a frequency value (for example, next to World: 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

📥 Commits

Reviewing files that changed from the base of the PR and between afdb04a and 1789a43.

⛔ Files ignored due to path filters (4)
  • map-generator/assets/maps/worldformobile/image.png is excluded by !**/*.png
  • resources/maps/worldformobile/map.bin is excluded by !**/*.bin
  • resources/maps/worldformobile/map16x.bin is excluded by !**/*.bin
  • resources/maps/worldformobile/map4x.bin is excluded by !**/*.bin
📒 Files selected for processing (6)
  • map-generator/assets/maps/worldformobile/info.json
  • map-generator/main.go
  • resources/lang/en.json
  • resources/maps/worldformobile/manifest.json
  • resources/maps/worldformobile/thumbnail.webp
  • src/core/game/Game.ts

Comment on lines +1 to +508
{
"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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

@github-project-automation github-project-automation bot moved this from Triage to Development in OpenFront Release Management Mar 18, 2026
@evanpelle
Copy link
Collaborator

looks like prettier is failing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development

Development

Successfully merging this pull request may close these issues.

2 participants