-
Notifications
You must be signed in to change notification settings - Fork 785
Adds Bering Strait map. #2924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Adds Bering Strait map. #2924
Conversation
WalkthroughThis pull request adds a new "Bering Strait" map to the game system. The change registers the map across multiple layers: asset metadata, language translations, game type definitions, server configuration, and map manifests with dimension and nation data for two territories. Changes
Sequence Diagram(s)(omitted — changes are data/enum/registry additions without new multi-component control flow) Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✏️ Tip: You can disable this entire section by setting 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 |
There was a problem hiding this 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
🤖 Fix all issues with AI agents
In `@resources/maps/beringstrait/manifest.json`:
- Line 1: The manifest.json in the Bering Strait map is improperly formatted
(Prettier failed) — open the manifest.json file and reformat it to valid, pretty
JSON (ensure proper braces, commas and indentation), then run Prettier to
rewrite the file (e.g., with npx prettier --write on the manifest file) and save
the changes so the CI Prettier check passes.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (4)
map-generator/assets/maps/beringstrait/image.pngis excluded by!**/*.pngresources/maps/beringstrait/map.binis excluded by!**/*.binresources/maps/beringstrait/map16x.binis excluded by!**/*.binresources/maps/beringstrait/map4x.binis excluded by!**/*.bin
📒 Files selected for processing (7)
map-generator/assets/maps/beringstrait/info.jsonmap-generator/main.goresources/lang/en.jsonresources/maps/beringstrait/manifest.jsonresources/maps/beringstrait/thumbnail.webpsrc/core/game/Game.tssrc/server/MapPlaylist.ts
🧰 Additional context used
🧠 Learnings (7)
📚 Learning: 2026-01-12T21:37:01.156Z
Learnt from: FloPinguin
Repo: openfrontio/OpenFrontIO PR: 2874
File: src/server/MapLandTiles.ts:7-11
Timestamp: 2026-01-12T21:37:01.156Z
Learning: In this repository's OpenFrontIO deployment, inter-service HTTP calls to the master should target http://localhost:3000 (master at port 3000) as the canonical address. Apply this as the standard for all server-side TypeScript code that communicates with the master. Avoid hardcoding non-master URLs; centralize the master address (e.g., via config or env) when possible, and ensure internal service communication uses localhost:3000 in this architecture.
Applied to files:
src/server/MapPlaylist.tssrc/core/game/Game.ts
📚 Learning: 2025-08-10T14:37:35.777Z
Learnt from: TheGiraffe3
Repo: openfrontio/OpenFrontIO PR: 1770
File: resources/maps/world/manifest.json:279-355
Timestamp: 2025-08-10T14:37:35.777Z
Learning: The OpenFrontIO World Map includes both real-world nations and fictional/creative entities like "Polar Bears" as playable nations. These special nations may use non-two-letter flag codes (e.g., "polar_bears" instead of a two-letter code), and this is intentional design. The corresponding flag assets are stored in resources/flags/ with matching filenames.
Applied to files:
map-generator/assets/maps/beringstrait/info.jsonresources/maps/beringstrait/manifest.json
📚 Learning: 2025-08-19T11:00:55.422Z
Learnt from: TheGiraffe3
Repo: openfrontio/OpenFrontIO PR: 1864
File: resources/maps/arabianpeninsula/manifest.json:13-170
Timestamp: 2025-08-19T11:00:55.422Z
Learning: In OpenFrontIO, nation names in map manifests are displayed directly in the UI without translation. They do not need to be added to resources/lang/en.json or processed through translateText(). This is the established pattern across all existing maps including Europe, World, Asia, Africa, and others.
Applied to files:
resources/lang/en.jsonresources/maps/beringstrait/manifest.json
📚 Learning: 2025-08-27T08:12:19.610Z
Learnt from: mokizzz
Repo: openfrontio/OpenFrontIO PR: 1940
File: resources/lang/en.json:763-766
Timestamp: 2025-08-27T08:12:19.610Z
Learning: In OpenFrontIO, some country entries in src/client/data/countries.json may have similar names but different codes (e.g., "Empire of Japan" vs "Empire of Japan1"). Each unique code requires its own translation key in resources/lang/en.json after normalization. Always verify against countries.json before suggesting removal of translation keys.
Applied to files:
resources/lang/en.json
📚 Learning: 2025-07-12T06:35:10.457Z
Learnt from: Aotumuri
Repo: openfrontio/OpenFrontIO PR: 1357
File: resources/lang/ja.json:0-0
Timestamp: 2025-07-12T06:35:10.457Z
Learning: In OpenFrontIO project, "giantworldmap" is the correct localization key name for the giant world map, used consistently across all language files and TypeScript code. Do not suggest renaming this key.
Applied to files:
resources/lang/en.jsonsrc/core/game/Game.ts
📚 Learning: 2025-10-27T08:59:47.620Z
Learnt from: TheGiraffe3
Repo: openfrontio/OpenFrontIO PR: 2306
File: src/core/game/Game.ts:141-141
Timestamp: 2025-10-27T08:59:47.620Z
Learning: In OpenFrontIO, gamemode-specific map variants that have altered geography from their real-world counterparts should be categorized as "fantasy" rather than "regional", even if based on real locations. Example: BaikalNukeWars is in "fantasy" because it has different islands than real Baikal.
Applied to files:
src/core/game/Game.ts
📚 Learning: 2026-01-13T20:16:05.535Z
Learnt from: FloPinguin
Repo: openfrontio/OpenFrontIO PR: 2887
File: src/core/execution/NukeExecution.ts:118-122
Timestamp: 2026-01-13T20:16:05.535Z
Learning: In code paths that return a Player-like object, prefer returning a union type (Player | TerraNullius) instead of undefined. When a function may fail to find a player, return TerraNullius for the 'not found' case and a Player for valid IDs, and check .isPlayer() (or equivalent) directly on the result instead of guarding with undefined or optional chaining. This should be enforced in Game, GameImpl, and GameView (and similar accessors) to avoid undefined checks and simplify null-safety handling.
Applied to files:
src/core/game/Game.ts
🪛 GitHub Actions: 🧪 CI
resources/maps/beringstrait/manifest.json
[warning] 1-1: Code style issues found in the file. Run 'prettier --write' to fix.
[error] 1-1: Prettier formatting check failed (exit code 1). Run 'npx prettier --write .' to fix.
🔇 Additional comments (8)
src/server/MapPlaylist.ts (1)
66-66: Looks good for playlist frequency.The new entry fits the existing mapping and should work as-is.
src/core/game/Game.ts (2)
120-120: Enum addition is clean and consistent.No issues with the new map type entry.
168-168: Regional category update looks correct.Placement matches the intended map grouping.
map-generator/main.go (1)
31-31: Map registry entry is correct.This aligns with the new assets and should enable generation.
resources/lang/en.json (1)
289-290: Translation key looks good.The key format matches existing map entries and should be picked up by the UI.
map-generator/assets/maps/beringstrait/info.json (1)
1-14: No action needed—nation coordinates use the correct established schema.The
"coordinates"key is used consistently across all existinginfo.jsonfiles in the repository (40+ maps verified). BeringStrait follows the same pattern. The generator reads nation data as dynamic JSON without strict key validation, so there is no risk of data loss from a key name mismatch.resources/maps/beringstrait/manifest.json (2)
18-35: LGTM! Nation definitions follow the correct pattern.The nation entries for Alaska and Russia are well-structured with valid flag codes (us, ru) and coordinates that fall within the map boundaries. Based on learnings, nation names are displayed directly without requiring translation, which is the established pattern.
2-16: Map dimensions and tile counts look reasonable.The scaled versions (map16x, map4x) have dimensions and land tile counts that are consistent with downscaling from the base map. The slight variations in tile ratios are expected due to interpolation during the scaling process.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Description:
PR to add Bering Strait map. Produced using TOPO data from real world location, rivers and lakes correct to real world location. The map is slightly smaller than most so facilitates smaller FFA games or 2 team game modes.
The centre island has been increased in size to enable better warfare to capture the strategic location.
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
TSProphet