Skip to content

Conversation

@TsProphet94
Copy link
Contributor

Description:

Adds a new Bosphorus Map (Turkey). One of the key strategic locations in the world and control access to the Black Sea. Smaller map that most to facilitate smaller FFA and Team games. Added are a selection of nations that correspond to the location.

image

Image 16-01-2026 at 17 39
Image 16-01-2026 at 17 39 (1)

Please complete the following:

  • I have added screenshots for all UI updates
  • I process any text displayed to the user through translateText() and I've added it to the en.json file
  • I have added relevant tests to the test directory
  • I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced

Please put your Discord username so you can be contacted if a bug or regression is found:

TSProphet

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 16, 2026

Walkthrough

A new "Bosphorus Straits" map has been added to the system through coordinated changes: map data definitions, backend registration, type definitions, localization strings, and playlist configuration.

Changes

Cohort / File(s) Summary
Map Data Definitions
map-generator/assets/maps/bosphorusstraits/info.json, resources/maps/bosphorusstraits/manifest.json
Two new JSON files define the Bosphorus Straits map with nation coordinates, names, flag codes, and regional variants (map16x, map4x). Total of 145 lines of map configuration data.
Backend Registration & Playlist
map-generator/main.go, src/server/MapPlaylist.ts
Map entry "bosphorusstraits" registered in the Go maps registry and added to frequency mapping with weight of 3 in the playlist system.
Type Definitions
src/core/game/Game.ts
GameMapType enum extended with BosphorusStraits value and added to mapCategories.regional group for classification.
Localization
resources/lang/en.json
Translation entry added: "bosphorusstraits" maps to "Bosphorus Straits" display name.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A strait divides the old and new,
Where East meets West in waters blue,
A map awaits explorers keen,
The Bosphorus now joins the scene,
One more world to claim and race! ⚔️🗺️

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: adding a new Bosphorus Straits map.
Description check ✅ Passed The description clearly explains the purpose and context of the new map, including its strategic significance and intended use for smaller game modes.
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.



📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b2ba37e and eee424d.

⛔ Files ignored due to path filters (4)
  • map-generator/assets/maps/bosphorusstraits/image.png is excluded by !**/*.png
  • resources/maps/bosphorusstraits/map.bin is excluded by !**/*.bin
  • resources/maps/bosphorusstraits/map16x.bin is excluded by !**/*.bin
  • resources/maps/bosphorusstraits/map4x.bin is excluded by !**/*.bin
📒 Files selected for processing (7)
  • map-generator/assets/maps/bosphorusstraits/info.json
  • map-generator/main.go
  • resources/lang/en.json
  • resources/maps/bosphorusstraits/manifest.json
  • resources/maps/bosphorusstraits/thumbnail.webp
  • src/core/game/Game.ts
  • src/server/MapPlaylist.ts
🧰 Additional context used
🧠 Learnings (11)
📚 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: 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:

  • src/core/game/Game.ts
📚 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/core/game/Game.ts
  • src/server/MapPlaylist.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
📚 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/maps/bosphorusstraits/manifest.json
  • map-generator/assets/maps/bosphorusstraits/info.json
📚 Learning: 2025-05-30T18:11:56.014Z
Learnt from: VariableVince
Repo: openfrontio/OpenFrontIO PR: 959
File: resources/maps/GatewayToTheAtlantic.json:124-124
Timestamp: 2025-05-30T18:11:56.014Z
Learning: In OpenFrontIO, flag names in map JSON files can use spaces (like "Amazigh flag") and don't need to follow slug format. Flag assets are stored with matching filenames including spaces (e.g., "Amazigh flag.svg"). Nation names and flag names are not translated/localized in the translation files.

Applied to files:

  • map-generator/assets/maps/bosphorusstraits/info.json
📚 Learning: 2025-05-30T16:16:27.118Z
Learnt from: VariableVince
Repo: openfrontio/OpenFrontIO PR: 957
File: resources/maps/GatewayToTheAtlantic.json:175-179
Timestamp: 2025-05-30T16:16:27.118Z
Learning: In OpenFrontIO project, flag values in map JSON files (like GatewayToTheAtlantic.json) should match the actual flag file names in the resources directory (e.g., "French foreign legion" corresponds to "French foreign legion.svg"). The naming convention follows the file naming system rather than code naming conventions.

Applied to files:

  • map-generator/assets/maps/bosphorusstraits/info.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:

  • map-generator/assets/maps/bosphorusstraits/info.json
  • resources/lang/en.json
📚 Learning: 2025-06-02T14:27:37.609Z
Learnt from: andrewNiziolek
Repo: openfrontio/OpenFrontIO PR: 1007
File: resources/lang/de.json:115-115
Timestamp: 2025-06-02T14:27:37.609Z
Learning: For OpenFrontIO project: When localization keys are renamed in language JSON files, the maintainers separate technical changes from translation content updates. They wait for community translators to update the actual translation values rather than attempting to translate in the same PR. This allows technical changes to proceed while ensuring accurate translations from native speakers.

Applied to files:

  • resources/lang/en.json
📚 Learning: 2025-08-16T10:52:08.292Z
Learnt from: TheGiraffe3
Repo: openfrontio/OpenFrontIO PR: 884
File: resources/lang/en.json:456-461
Timestamp: 2025-08-16T10:52:08.292Z
Learning: In OpenFrontIO, translation files in resources/lang/*.json (except en.json) should not be updated in regular PRs. Only dedicated translation PRs titled "mls" and made by Aotumori should update non-English locale files. Regular PRs should only update en.json when adding or modifying translation keys.

Applied to files:

  • resources/lang/en.json
📚 Learning: 2025-05-30T03:53:52.231Z
Learnt from: scottanderson
Repo: openfrontio/OpenFrontIO PR: 949
File: resources/lang/en.json:8-10
Timestamp: 2025-05-30T03:53:52.231Z
Learning: For the OpenFrontIO project, do not suggest updating translation files in resources/lang/*.json except for en.json. The project has a dedicated translation team that handles all other locale files.

Applied to files:

  • resources/lang/en.json
🔇 Additional comments (8)
resources/lang/en.json (1)

289-290: LGTM!

The new translation entry follows the existing pattern: lowercase key (bosphorusstraits) and proper display name (Bosphorus Straits). Trailing comma correctly added to the previous entry.

src/core/game/Game.ts (2)

120-120: LGTM!

New enum entry BosphorusStraits correctly added to GameMapType. The string value matches the translation in en.json.


168-168: LGTM!

Correct placement in the regional category. Based on learnings, this is the right choice since the Bosphorus Straits map represents a real-world location without altered geography.

map-generator/main.go (1)

32-32: LGTM!

New map entry follows the established pattern: lowercase name, no IsTest flag (defaults to false for production maps), and placed in alphabetical order.

src/server/MapPlaylist.ts (1)

66-66: LGTM!

Frequency of 3 is reasonable for a smaller regional map, matching similar maps like AmazonRiver and Lemnos. The key BosphorusStraits correctly matches the GameMapName type derived from the enum.

resources/maps/bosphorusstraits/manifest.json (1)

1-80: LGTM!

The manifest is well-structured and complete:

  • Map dimensions and scaled variants look correct with proper proportional scaling.
  • The name field matches the translation in en.json.
  • All 12 nation coordinates are within the map bounds (1000×612).
  • Flag codes use standard ISO country codes (tr, bg, gr).

Based on learnings, nation names are displayed directly in the UI without needing translation entries, which is the established pattern.

map-generator/assets/maps/bosphorusstraits/info.json (2)

1-2: LGTM! Clean map definition structure.

The JSON structure is correct and the map name matches the translation key in en.json.


3-64: Nations data is correct and well-positioned.

All flag assets (tr.svg, bg.svg, gr.svg) exist in resources/flags/. All 12 nation coordinates fit within the map dimensions (1000×612). The geographic selection is appropriate—Turkish cities dominate the straits area, Bulgarian cities represent the northern coast, and Greek islands mark the southern boundary.

✏️ Tip: You can disable this entire section by setting review_details to false in your review 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.

@ryanbarlow97 ryanbarlow97 added this to the v30 milestone Jan 20, 2026
@iiamlewis iiamlewis added the Maps A new map, or adjustments to an existing map itself, its json, etc, label Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maps A new map, or adjustments to an existing map itself, its json, etc,

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants