Added korea map#3976
Conversation
|
Caution Review failedFailed to post review comments WalkthroughAdds a new Korea regional map (data + manifest), registers it in the generator and game enums, sets playlist frequency, adds translation, and reforms many map manifest files to use multi-line coordinate arrays (formatting-only). ChangesKorea Map Addition and Integration
JSON Manifest Formatting Standardization
Sequence DiagramsequenceDiagram
participant GameType as src/core/game/Game.ts
participant Playlist as src/server/MapPlaylist.ts
participant Generator as map-generator/main.go
participant Resources as resources/lang/en.json
GameType->>Playlist: expose GameMapName.Korea
Playlist->>Generator: include korea weight in selection
Generator->>Resources: uses map name `korea` for generation/labels
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies" 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.
Actionable comments posted: 3
🤖 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/korea/info.json`:
- Around line 1-225: The PR added a new map metadata object named
"KOREAN_PENINSUALA" (map-generator/assets/maps/korea/info.json) but did not
update CREDITS.md; add a new entry in CREDITS.md that includes the map name
("KOREAN_PENINSUALA"), the data/elevation source(s) and their license(s), and a
short attribution line (source URL and license identifier), and place it under
the maps or data-sources section following the existing formatting conventions
used for other maps.
- Line 2: The map identifier value "KOREAN_PENINSUALA" in the info.json needs to
be corrected to "KOREAN_PENINSULA"; update the "name" field in
map-generator/assets/maps/korea/info.json and also update the corresponding
identifier in resources/maps/korea/manifest.json so both files use the exact
same corrected symbol ("KOREAN_PENINSULA") to keep manifests aligned.
In `@src/core/game/Game.ts`:
- Line 176: The change added a new enum member GameMapType.Korea but tests were
not updated; add unit tests that assert the enum includes "Korea" (e.g.,
reference GameMapType.Korea) and that the game map categorization logic includes
Korea in the regional category (test the function or mapping that produces the
"regional" category contains GameMapType.Korea), updating or adding tests around
the regional category behavior used in Game (and any helper like
mapCategory/regionMapping) so CI verifies both enum availability and inclusion
in the regional category.
🪄 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: a9ecca34-7409-4181-b547-fd9e932e98f0
⛔ Files ignored due to path filters (4)
map-generator/assets/maps/korea/image.pngis excluded by!**/*.pngresources/maps/korea/map.binis excluded by!**/*.binresources/maps/korea/map16x.binis excluded by!**/*.binresources/maps/korea/map4x.binis excluded by!**/*.bin
📒 Files selected for processing (92)
map-generator/assets/maps/korea/info.jsonmap-generator/main.goresources/lang/en.jsonresources/maps/achiran/manifest.jsonresources/maps/aegean/manifest.jsonresources/maps/africa/manifest.jsonresources/maps/alps/manifest.jsonresources/maps/amazonriver/manifest.jsonresources/maps/antarctica/manifest.jsonresources/maps/archipelagosea/manifest.jsonresources/maps/arctic/manifest.jsonresources/maps/asia/manifest.jsonresources/maps/australia/manifest.jsonresources/maps/baikal/manifest.jsonresources/maps/baikalnukewars/manifest.jsonresources/maps/bajacalifornia/manifest.jsonresources/maps/beringsea/manifest.jsonresources/maps/beringstrait/manifest.jsonresources/maps/betweentwoseas/manifest.jsonresources/maps/blacksea/manifest.jsonresources/maps/bosphorusstraits/manifest.jsonresources/maps/britannia/manifest.jsonresources/maps/britanniaclassic/manifest.jsonresources/maps/caucasus/manifest.jsonresources/maps/conakry/manifest.jsonresources/maps/danishstraits/manifest.jsonresources/maps/deglaciatedantarctica/manifest.jsonresources/maps/didier/manifest.jsonresources/maps/didierfrance/manifest.jsonresources/maps/dyslexdria/manifest.jsonresources/maps/eastasia/manifest.jsonresources/maps/europe/manifest.jsonresources/maps/europeclassic/manifest.jsonresources/maps/falklandislands/manifest.jsonresources/maps/faroeislands/manifest.jsonresources/maps/fourislands/manifest.jsonresources/maps/gatewaytotheatlantic/manifest.jsonresources/maps/giantworldmap/manifest.jsonresources/maps/greatlakes/manifest.jsonresources/maps/gulfofstlawrence/manifest.jsonresources/maps/halkidiki/manifest.jsonresources/maps/hawaii/manifest.jsonresources/maps/iceland/manifest.jsonresources/maps/italia/manifest.jsonresources/maps/japan/manifest.jsonresources/maps/korea/manifest.jsonresources/maps/korea/thumbnail.webpresources/maps/lemnos/manifest.jsonresources/maps/lisbon/manifest.jsonresources/maps/losangeles/manifest.jsonresources/maps/luna/manifest.jsonresources/maps/manicouagan/manifest.jsonresources/maps/marenostrum/manifest.jsonresources/maps/mars/manifest.jsonresources/maps/mena/manifest.jsonresources/maps/middleeast/manifest.jsonresources/maps/milkyway/manifest.jsonresources/maps/montreal/manifest.jsonresources/maps/newyorkcity/manifest.jsonresources/maps/niledelta/manifest.jsonresources/maps/northamerica/manifest.jsonresources/maps/northwestpassage/manifest.jsonresources/maps/oceania/manifest.jsonresources/maps/pangaea/manifest.jsonresources/maps/passage/manifest.jsonresources/maps/pluto/manifest.jsonresources/maps/sanfrancisco/manifest.jsonresources/maps/sierpinski/manifest.jsonresources/maps/southamerica/manifest.jsonresources/maps/straitofgibraltar/manifest.jsonresources/maps/straitofhormuz/manifest.jsonresources/maps/straitofmalacca/manifest.jsonresources/maps/surrounded/manifest.jsonresources/maps/svalmel/manifest.jsonresources/maps/taiwanstrait/manifest.jsonresources/maps/thebox/manifest.jsonresources/maps/tourney1/manifest.jsonresources/maps/tourney2/manifest.jsonresources/maps/tourney3/manifest.jsonresources/maps/tourney4/manifest.jsonresources/maps/tradersdream/manifest.jsonresources/maps/twolakes/manifest.jsonresources/maps/world/manifest.jsonresources/maps/yenisei/manifest.jsonsrc/core/game/Game.tssrc/server/MapPlaylist.tstests/testdata/maps/big_plains/manifest.jsontests/testdata/maps/giantworldmap/manifest.jsontests/testdata/maps/half_land_half_ocean/manifest.jsontests/testdata/maps/ocean_and_land/manifest.jsontests/testdata/maps/plains/manifest.jsontests/testdata/maps/world/manifest.json
| TaiwanStrait = "Taiwan Strait", | ||
| DanishStraits = "Danish Straits", | ||
| NorthwestPassage = "Northwest Passage", | ||
| Korea = "Korea" |
There was a problem hiding this comment.
Add tests for the new GameMapType.Korea core wiring.
This updates src/core/ map typing/category behavior, but no related test updates are included in the provided changes. Please add tests that cover enum availability and regional category inclusion.
As per coding guidelines: “All changes to src/core/ must include tests”.
Also applies to: 242-243
🤖 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 `@src/core/game/Game.ts` at line 176, The change added a new enum member
GameMapType.Korea but tests were not updated; add unit tests that assert the
enum includes "Korea" (e.g., reference GameMapType.Korea) and that the game map
categorization logic includes Korea in the regional category (test the function
or mapping that produces the "regional" category contains GameMapType.Korea),
updating or adding tests around the regional category behavior used in Game (and
any helper like mapCategory/regionMapping) so CI verifies both enum availability
and inclusion in the regional category.
There was a problem hiding this comment.
Dismiss and resolve. Specific maps do not need a test. No map is specifically denoted in a test @crunchybbbbb
There was a problem hiding this comment.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
Description:
Map of the Korean Peninsula. Size: 1092x2219. Includes small parts of china, russia and japan.
Nations: 34
Based on provinces
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
crunchybbbbb @crunchybbbbb_59649