Skip to content

Add Titan map with random spawn nations - along new Cosmic map category#4183

Open
RickD004 wants to merge 6 commits into
openfrontio:mainfrom
RickD004:Titan
Open

Add Titan map with random spawn nations - along new Cosmic map category#4183
RickD004 wants to merge 6 commits into
openfrontio:mainfrom
RickD004:Titan

Conversation

@RickD004

@RickD004 RickD004 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Resolves #4182

Description:

Adds "Titan" (real moon of Saturn with methane seas) map . Uses new random spawn nation feature by FloPinguin. #4156

Also adds new Cosmic map category. The "Other" map category has become a wastebasket of unrelated maps, and with increasing number of maps, i think its a good addition to have better categories for these maps.

I figured these 2 changes should go together since im adding a cosmic map, and a cosmic category.

proof of nations spawning randomly and how the cosmic category looks in the menu:

titan_teaser-ezgif.com-resize-video.mp4

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

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

tri.star1011

@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds Titan as a new playable map with assets and manifest, registers it in the map generator and playlist, updates GameMapType and mapCategories (introducing cosmic), adds translations and credits, and inserts a new country entry for flags.

Changes

Titan Map and Cosmic Category

Layer / File(s) Summary
Titan assets, manifest, and country entry
map-generator/assets/maps/titan/info.json, resources/maps/titan/manifest.json, resources/countries.json
Adds Titan info.json with nations/flags, creates resources/maps/titan/manifest.json (base and derived sizes and nations), and inserts Purple Flag into resources/countries.json.
GameMapType and mapCategories update
src/core/game/Game.ts
Adds Titan to GameMapType and reorganizes mapCategories, creating/using a cosmic category and moving maps between fantasy and cosmic.
Map registration, translations, playlist, and credits
map-generator/main.go, resources/lang/en.json, src/server/MapPlaylist.ts, CREDITS.md
Registers titan in the map-generator registry, adds titan and the cosmic category translation, sets Titan playlist frequency to 3, and appends Titan attribution to CREDITS.md.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

Feature, approved, bypass-pr-check

Suggested reviewers

  • evanpelle

Poem

🌙 Titan sails onto the board tonight,
manifests, flags, and credits all in sight.
A cosmic shelf rearranged with care,
new nations spawn beneath cold air.
🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: adding the Titan map with random spawn nations and a new Cosmic map category.
Description check ✅ Passed The description clearly relates to the changeset, explaining the Titan map addition, random spawn nations feature, and new Cosmic category with supporting context.
Linked Issues check ✅ Passed The pull request implements all objectives from #4182: adds Titan map with random spawn nations support, creates new Cosmic category, updates translations, and includes tests.
Out of Scope Changes check ✅ Passed All changes are within scope: Titan map addition, Cosmic category creation, map registry updates, translations, and a new Purple Flag country entry supporting the random spawn feature.
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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@map-generator/assets/maps/titan/info.json`:
- Line 6: The "flag" value for titan is set to "Purple Flag" in
map-generator/assets/maps/titan/info.json (and
resources/maps/titan/manifest.json) but no matching resources/flags/Purple
Flag.svg exists; either add an SVG file named exactly "Purple Flag.svg" to
resources/flags/ or change the "flag" value in info.json/manifest.json to the
name of an existing SVG (matching the client URL pattern
/flags/${nation.flag}.svg) so the client will load a valid flag asset.
🪄 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: 149a211a-d6b0-4e06-abc3-49c9826b4012

📥 Commits

Reviewing files that changed from the base of the PR and between 27517e3 and bce7c0d.

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

Comment thread map-generator/assets/maps/titan/info.json
@github-project-automation github-project-automation Bot moved this from Triage to Development in OpenFront Release Management Jun 7, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 7, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 9, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/core/game/Game.ts`:
- Line 189: The PR adds HongKong to the GameMapType enum (symbol: GameMapType)
and to mapCategories.regional but the PR description mentions Titan + cosmic
which doesn't match this change; update the PR description to explicitly state
that HongKong was added and that map consistency is satisfied (referencing
map-generator/main.go "hongkong", src/server/MapPlaylist.ts entry, assets under
map-generator/assets/maps/hongkong, resources/maps/hongkong files, and
resources/lang/en.json "hongkong"), or if HongKong was not intended, remove it
from GameMapType and mapCategories.regional and adjust tests
(tests/MapConsistency.test.ts) accordingly so the PR scope and code changes are
consistent.
🪄 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: de0420e9-8efc-4c90-8bad-1478a87c12b9

📥 Commits

Reviewing files that changed from the base of the PR and between 6d3a453 and cad357e.

📒 Files selected for processing (4)
  • map-generator/main.go
  • resources/lang/en.json
  • src/core/game/Game.ts
  • src/server/MapPlaylist.ts
✅ Files skipped from review due to trivial changes (1)
  • resources/lang/en.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • map-generator/main.go
  • src/server/MapPlaylist.ts

Comment thread src/core/game/Game.ts
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 10, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@resources/lang/en.json`:
- Line 618: The JSON entry for the "hongkong" key in resources/lang/en.json is
missing a trailing comma which breaks JSON syntax; update the "hongkong": "Hong
Kong" line to include a trailing comma so it becomes a properly separated item
in the object (i.e., add a comma after the value for the "hongkong" key).
🪄 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: 6e6cf1d4-7e86-4397-8be9-3f4d5e0b59d8

📥 Commits

Reviewing files that changed from the base of the PR and between cad357e and ceb6672.

📒 Files selected for processing (4)
  • map-generator/main.go
  • resources/lang/en.json
  • src/core/game/Game.ts
  • src/server/MapPlaylist.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/server/MapPlaylist.ts
  • map-generator/main.go
  • src/core/game/Game.ts

Comment thread resources/lang/en.json Outdated
@RickD004

Copy link
Copy Markdown
Contributor Author

@coderabbitai approve

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Comments resolved and changes approved.

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.

Add Titan map with random spawn nations - along new Cosmic map category

2 participants