Skip to content

Adds Map of China#4468

Merged
evanpelle merged 14 commits into
openfrontio:mainfrom
crunchybbb2:china
Jul 2, 2026
Merged

Adds Map of China#4468
evanpelle merged 14 commits into
openfrontio:mainfrom
crunchybbb2:china

Conversation

@crunchybbb2

@crunchybbb2 crunchybbb2 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Before opening a PR: discuss new features on Discord first, and file bugs or small improvements as issues. You must be assigned to an approved issue — unsolicited PRs will be auto-closed.

Add approved & assigned issue number here:

Resolves #4419

Description:

  • Adds a China Map. This is themed after Qing China from the late 19th and early 20th centuries, which is why the map also includes Mongolia and Taiwan.
  • There are 32 nations themed after qing provinces, warlords, factions, European colonies, rebellions.
  • Also adds several new flags: EastTurkestan, Manchukuo, BritishHongKong, TaipingHeavenlyKingdom, etc.
  • Includes additional nations for a total of 62 nations.
  • Size: 1892x2080
  • Land area: approx. 1.86M
  • Adds Caspian Sea and China to the new category (which i forgot earlier)

https://youtu.be/ew9Qizo67cA

image

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:

DISCORD_USERNAME crunchybbbbb

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds a new China map across generator data, runtime manifest data, registry wiring, translation, and country flag entries. It also updates CaspianSea categories.

Changes

China Map Addition

Layer / File(s) Summary
Map registry and translation wiring
src/core/game/Maps.gen.ts, map-generator/assets/maps/caspiansea/info.json, resources/lang/en.json
Adds GameMapType.China and its maps entry, updates CaspianSea categories with "new", and adds the map.china translation key.
China map generator source data
map-generator/assets/maps/china/info.json
Creates the China generator metadata with map fields, nations, and additional nations.
China map resource manifest
resources/maps/china/manifest.json
Creates the China runtime manifest with additional nations, map metadata, dimensions, nations, and translation key.
New country flag entries
resources/countries.json
Adds British Hong Kong, East Turkestan, Ma Clique, Manchukuo, and Taiping Heavenly Kingdom entries.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

Suggested reviewers: evanpelle

Poem

A new map blooms where old borders sleep,
With flags and names the archives keep.
China joins the game world wide,
And CaspianSea gets a fresh new tide.
🗺️

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding a China map.
Description check ✅ Passed The description is clearly about the China map and its related data changes.
Linked Issues check ✅ Passed The changes match the China map requirements, including new nations, flags, categories, and map metadata.
Out of Scope Changes check ✅ Passed All listed file changes relate to the China map feature and supporting data.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

@crunchybbb2 crunchybbb2 changed the title China Adds Map of China Jul 1, 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: 2

🤖 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/china/info.json`:
- Around line 270-274: Update the map entry for Second East Turkestan Republic
to use the existing Eastern_Turkistan_Flag asset instead of the pk country code.
Make this change in the China map info data and keep the corresponding manifest
entry in sync so both references point to the same flag identifier. Locate the
affected records by the name field "Second East Turkestan Republic" and the
Eastern_Turkistan_Flag symbol already defined in the repo.
- Around line 275-279: The Shanxi Clique entry in the map info uses the wrong
flag symbol. Update the record identified by the name field “Shanxi Clique” so
it uses the Republic of China flag symbol instead of “tw”, matching the other
cliques in this dataset.
🪄 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: f31e2549-0585-40d4-b866-5b7d3907dae4

📥 Commits

Reviewing files that changed from the base of the PR and between 2794ab1 and d34b4c2.

⛔ Files ignored due to path filters (10)
  • map-generator/assets/maps/china/image.png is excluded by !**/*.png
  • resources/flags/Eastern_Turkistan_Flag.svg is excluded by !**/*.svg
  • resources/flags/Flag_of_Hong_Kong_(1959-1997).svg is excluded by !**/*.svg
  • resources/flags/Flag_of_Manchukuo.svg is excluded by !**/*.svg
  • resources/flags/Flag_of_Taiping_Heavenly_Kingdom.svg is excluded by !**/*.svg
  • resources/flags/Kuomintang_Emblem.svg is excluded by !**/*.svg
  • resources/flags/Ma_Clique_Flag.svg is excluded by !**/*.svg
  • resources/maps/china/map.bin is excluded by !**/*.bin
  • resources/maps/china/map16x.bin is excluded by !**/*.bin
  • resources/maps/china/map4x.bin is excluded by !**/*.bin
📒 Files selected for processing (8)
  • map-generator/assets/maps/caspiansea/info.json
  • map-generator/assets/maps/china/info.json
  • resources/countries.json
  • resources/lang/en.json
  • resources/maps/caspiansea/manifest.json
  • resources/maps/china/manifest.json
  • resources/maps/china/thumbnail.webp
  • src/core/game/Maps.gen.ts

Comment thread map-generator/assets/maps/china/info.json
Comment thread map-generator/assets/maps/china/info.json
@github-project-automation github-project-automation Bot moved this from Triage to Development in OpenFront Release Management Jul 1, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 1, 2026
@RickD004 RickD004 added the Maps A new map, or adjustments to an existing map itself, its json, etc, label Jul 1, 2026
@RickD004 RickD004 added this to the v33 milestone Jul 1, 2026
@evanpelle

Copy link
Copy Markdown
Collaborator

looks like prettier is failing, can you run npm run format

@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.

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

23-78: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Nation entries show as changed but content is unchanged — likely a formatting-only diff.

The line-range change summary only documents the categories update on Line 2, yet these nation entries (lines 23-78) are all marked as changed with identical content. This is consistent with the reviewer's note that Prettier is failing on this PR — running npm run format should resolve the unintended whitespace/indentation churn here.

🤖 Prompt for 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.

In `@resources/maps/caspiansea/manifest.json` around lines 23 - 78, The changes in
the manifest appear to be formatting-only churn with no content updates, so
normalize the JSON in resources/maps/caspiansea/manifest.json rather than
editing the data itself. Run the repository’s formatter on this file (as noted
by the review, npm run format) and ensure the nation entries under the map
manifest remain semantically unchanged while indentation/whitespace matches the
expected style. Use the manifest structure and the affected nation object array
as the target area when verifying the diff.
🤖 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.

Nitpick comments:
In `@resources/maps/caspiansea/manifest.json`:
- Around line 23-78: The changes in the manifest appear to be formatting-only
churn with no content updates, so normalize the JSON in
resources/maps/caspiansea/manifest.json rather than editing the data itself. Run
the repository’s formatter on this file (as noted by the review, npm run format)
and ensure the nation entries under the map manifest remain semantically
unchanged while indentation/whitespace matches the expected style. Use the
manifest structure and the affected nation object array as the target area when
verifying the diff.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d497fba6-126e-4e20-b695-be0ac63ab5d1

📥 Commits

Reviewing files that changed from the base of the PR and between aeacc28 and 9262e0a.

📒 Files selected for processing (2)
  • resources/lang/en.json
  • resources/maps/caspiansea/manifest.json
✅ Files skipped from review due to trivial changes (1)
  • resources/lang/en.json

@evanpelle evanpelle enabled auto-merge July 2, 2026 21:51
@evanpelle evanpelle added this pull request to the merge queue Jul 2, 2026
@github-project-automation github-project-automation Bot moved this from Development to Final Review in OpenFront Release Management Jul 2, 2026
@evanpelle evanpelle removed this pull request from the merge queue due to a manual request Jul 2, 2026
@evanpelle evanpelle merged commit a724551 into openfrontio:main Jul 2, 2026
10 checks passed
@github-project-automation github-project-automation Bot moved this from Final Review to Complete in OpenFront Release Management Jul 2, 2026
@crunchybbb2 crunchybbb2 deleted the china branch July 9, 2026 00:19
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

Status: Complete

Development

Successfully merging this pull request may close these issues.

Adds Map of China (With Impassable terrain)

3 participants