Skip to content

Add Cyprus map#2842

Closed
TsProphet94 wants to merge 3 commits intoopenfrontio:mainfrom
TsProphet94:feature/cyprus-map
Closed

Add Cyprus map#2842
TsProphet94 wants to merge 3 commits intoopenfrontio:mainfrom
TsProphet94:feature/cyprus-map

Conversation

@TsProphet94
Copy link
Copy Markdown
Contributor

@TsProphet94 TsProphet94 commented Jan 9, 2026

Description:

Adds a new Cyprus map featuring the island of Cyprus and surrounding coastal regions of Turkey and Syria. Three way Baikal/Nukewars for team games.

Cyprus Cyprus_debug

Changes
Added Cyprus map files (map.bin, map4x.bin, map16x.bin, manifest.json)
Added map-generator source assets (image.png, info.json)
Updated GameMapType enum with Cyprus
Added to regional map category
Added playlist frequency and player count configuration
Added language translation
Nations

Cyprus:

Nicosia
Paphos
Limassol
Northern Cyprus

Turkey:

Mersin
Hatay
Antalya

Syria:

Lattakia
Tartus
Hamah

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

@TsProphet94 TsProphet94 requested a review from a team as a code owner January 9, 2026 20:10
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jan 9, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ TsProphet94
❌ Prophet101
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 9, 2026

Walkthrough

Adds a new "Cyprus" map: new map assets and manifest, registers it in the map generator and server playlist, updates localization and client map descriptions, and replaces six older map entries across enums and default configs.

Changes

Cohort / File(s) Summary
Map assets & manifest
map-generator/assets/maps/cyprus/info.json, resources/maps/cyprus/manifest.json
New Cyprus map data and manifest with overall/4x/16x dimensions and nation coordinates/flags.
Map generator registry
map-generator/main.go
Replaced britanniaclassic with cyprus in the maps registry.
Localization & client UI
resources/lang/en.json, src/client/components/Maps.ts
Added cyprus translation and Cyprus MapDescription; removed six older map entries.
Game types & defaults
src/core/game/Game.ts, src/core/configuration/DefaultConfig.ts
Added Cyprus to GameMapType and mapCategories.regional; added Cyprus player-tier config [50,40,30]; removed six previous map members.
Server playlist
src/server/MapPlaylist.ts
Replaced BritanniaClassic: 4 with Cyprus: 4 in the map frequency mapping.

Sequence Diagram(s)

(omitted — changes are data and registration updates without new multi-component control flow)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Feat: Lemnos Map #2683 — performs the same add-map pattern (assets, manifest, enums, configs, playlist).
  • Add Achiran #2280 — similar edits to map registry, localization, and manifests for adding a map.
  • Add Japan map #2106 — another add-map PR touching the same symbols/files (registry, manifests, GameMapType, configs).

Suggested labels

Feature - Map, Maps

Suggested reviewers

  • evanpelle
  • Tidwell

Poem

🌊 A new isle lines the code today,
Flags aligned and pixels laid,
Registry swapped, the playlist tuned,
Cyprus lands—let games be played!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add Cyprus map' directly and clearly describes the main change: introducing a new Cyprus map to the project.
Description check ✅ Passed The description thoroughly documents the Cyprus map addition, listing all changes, new files, configuration updates, nations/locations, and includes supporting screenshots.
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 5025058 and 8b2dd9c.

📒 Files selected for processing (2)
  • map-generator/assets/maps/cyprus/info.json
  • resources/maps/cyprus/manifest.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • map-generator/assets/maps/cyprus/info.json
  • resources/maps/cyprus/manifest.json

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
Copy Markdown
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: 0

🧹 Nitpick comments (1)
resources/maps/cyprus/manifest.json (1)

100-100: Add trailing newline for consistency.

The file is missing a trailing newline at the end. While not critical, most JSON files in projects include one for POSIX compliance and editor compatibility.

📝 Add trailing newline

Add a blank line after the closing brace on line 100.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cf1e67c and d339e03.

⛔ Files ignored due to path filters (4)
  • map-generator/assets/maps/cyprus/image.png is excluded by !**/*.png
  • resources/maps/cyprus/map.bin is excluded by !**/*.bin
  • resources/maps/cyprus/map16x.bin is excluded by !**/*.bin
  • resources/maps/cyprus/map4x.bin is excluded by !**/*.bin
📒 Files selected for processing (9)
  • map-generator/assets/maps/cyprus/info.json
  • map-generator/main.go
  • resources/lang/en.json
  • resources/maps/cyprus/manifest.json
  • resources/maps/cyprus/thumbnail.webp
  • src/client/components/Maps.ts
  • src/core/configuration/DefaultConfig.ts
  • src/core/game/Game.ts
  • src/server/MapPlaylist.ts
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-11-12T23:11:34.445Z
Learnt from: MaxHT0x
Repo: openfrontio/OpenFrontIO PR: 2262
File: src/core/configuration/DefaultConfig.ts:806-832
Timestamp: 2025-11-12T23:11:34.445Z
Learning: In src/core/configuration/DefaultConfig.ts, JSDoc documentation for configuration methods should not be added inline, as it was requested that documentation be placed elsewhere in the codebase.

Applied to files:

  • src/core/configuration/DefaultConfig.ts
📚 Learning: 2025-10-26T15:37:07.732Z
Learnt from: GlacialDrift
Repo: openfrontio/OpenFrontIO PR: 2298
File: src/client/graphics/layers/TerritoryLayer.ts:200-210
Timestamp: 2025-10-26T15:37:07.732Z
Learning: In GameImpl.ts lines 124-139, team assignment logic varies by number of teams: when numPlayerTeams < 8, teams are assigned ColoredTeams values (Red, Blue, Yellow, Green, Purple, Orange, Teal); when numPlayerTeams >= 8, teams are assigned generic string identifiers like "Team 1", "Team 2", etc., which are not members of ColoredTeams.

Applied to files:

  • src/core/configuration/DefaultConfig.ts
📚 Learning: 2025-10-21T20:06:04.823Z
Learnt from: Saphereye
Repo: openfrontio/OpenFrontIO PR: 2233
File: src/client/HostLobbyModal.ts:891-891
Timestamp: 2025-10-21T20:06:04.823Z
Learning: For the HumansVsNations game mode in `src/client/HostLobbyModal.ts` and related files, the implementation strategy is to generate all nations and adjust their strength for balancing, rather than limiting lobby size based on the number of available nations on the map.

Applied to files:

  • src/core/configuration/DefaultConfig.ts
📚 Learning: 2025-10-20T20:15:28.858Z
Learnt from: sambokai
Repo: openfrontio/OpenFrontIO PR: 2225
File: src/core/execution/FakeHumanExecution.ts:51-51
Timestamp: 2025-10-20T20:15:28.858Z
Learning: In src/core/execution/FakeHumanExecution.ts, game balance constants like MIRV_COOLDOWN_TICKS, MIRV_HESITATION_ODDS, VICTORY_DENIAL_TEAM_THRESHOLD, VICTORY_DENIAL_INDIVIDUAL_THRESHOLD, and STEAMROLL_CITY_GAP_MULTIPLIER are experimental tuning parameters subject to frequent change during balance testing. Do not flag changes to these values as issues or compare them against previous values.

Applied to files:

  • src/core/configuration/DefaultConfig.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: 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
🔇 Additional comments (10)
src/core/game/Game.ts (2)

110-110: LGTM! Cyprus enum entry added correctly.

The new map type follows the established pattern and uses a clear, descriptive name.


149-149: LGTM! Cyprus correctly categorized as regional.

Cyprus represents a real geographic location and should be in the "regional" category rather than "fantasy". This aligns with the project's categorization standards.

Based on learnings: gamemode variants with altered geography belong in "fantasy", while real-world locations belong in "regional".

src/core/configuration/DefaultConfig.ts (1)

88-88: LGTM! Player count configuration is appropriate.

The values [50, 40, 30] are consistent with other regional maps of similar geographic scope (e.g., Iceland uses the same configuration).

src/client/components/Maps.ts (1)

47-47: LGTM! Map description entry added correctly.

The key-value pair follows the established pattern and maintains type safety with the GameMapType enum.

resources/lang/en.json (1)

248-249: LGTM! Translation entry added correctly.

The lowercase key format and translation value follow the established pattern for map names.

map-generator/main.go (1)

34-34: LGTM! Map registry entry added correctly.

The entry is alphabetically ordered between "britannia" and "deglaciatedantarctica" and follows the established pattern. All required source assets and generated outputs are in place:

  • Source: image.png and info.json exist with proper configuration
  • Outputs: manifest.json, map binaries (map.bin, map4x.bin, map16x.bin), and thumbnail.webp are all generated
src/server/MapPlaylist.ts (1)

33-33: LGTM! Cyprus frequency is appropriate.

The frequency value of 4 is consistent with other regional maps of similar size (Australia, FalklandIslands, etc.), and the alphabetical ordering is maintained correctly.

resources/maps/cyprus/manifest.json (2)

2-16: LGTM! Map dimension scaling looks correct.

The dimensions scale appropriately across resolutions (1x, 4x, 16x), and the land tile counts show expected variance due to resampling at different resolutions.


18-99: Nations data matches info.json correctly.

The nations array in manifest.json is identical to map-generator/assets/maps/cyprus/info.json. This ensures both files stay in sync. If both are maintained by hand, consider making one file the main source and generating the other automatically to avoid future differences.

map-generator/assets/maps/cyprus/info.json (1)

1-85: Coordinates are valid and within map bounds.

All nation coordinates fall within the expected map dimensions (width: 2048, height: 1253). The x-range is 144–2019 and y-range is 131–1051, so no action is needed here.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jan 9, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jan 9, 2026
@ryanbarlow97
Copy link
Copy Markdown
Contributor

Hiya, putting into draft as there are conflicts

@ryanbarlow97 ryanbarlow97 marked this pull request as draft January 20, 2026 16:54
@iiamlewis
Copy link
Copy Markdown
Contributor

I am closing this draft PR now in preperation for v30 sprint. if this is still active please reopen

@iiamlewis iiamlewis closed this Jan 22, 2026
@TsProphet94 TsProphet94 deleted the feature/cyprus-map branch March 10, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants