Skip to content

Adds Indian Subcontinent map#3975

Open
RickD004 wants to merge 3 commits into
openfrontio:mainfrom
RickD004:india
Open

Adds Indian Subcontinent map#3975
RickD004 wants to merge 3 commits into
openfrontio:mainfrom
RickD004:india

Conversation

@RickD004
Copy link
Copy Markdown
Contributor

Description:

Adds Map of the Indian Subcontinent, with indian and pakistani states and surrounding countries, important rivers like the Ganges, Brahmaputra and Indus, and Tibet/ theHimalayas

2M land pixels and 52 Nations (i think its fitting that India has the most nations of a regional map, only continental maps have more)

Should be nice to boost whatever indian playerbase this game might have. This region also doesnt have any representation aside from continental maps

image image

Elevation data from NASA DEM, already credited in CREDITS.md

No reference test is needed, the test suite automatically iterates over all GameMapType enum values — no map is hardcoded by name in the tests

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:

tri.star1011

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

Review Change Stack

Walkthrough

This PR adds the Indian Subcontinent as a new playable map: assets and manifest are added, the map is registered in the generator and GameMapType, playlist frequency and English label are set, and three region entries are added to the country list.

Changes

Indian Subcontinent Map Onboarding

Layer / File(s) Summary
Map asset files and generator registration
map-generator/assets/maps/indiansubcontinent/info.json, resources/maps/indiansubcontinent/manifest.json, map-generator/main.go
Info.json and manifest.json define the map's nations, coordinates, flags, and tile metadata. main.go registers indiansubcontinent so the generator accepts --maps=indiansubcontinent.
Game type definition and continental categorization
src/core/game/Game.ts
Adds GameMapType.IndianSubcontinent and includes it in mapCategories.continental.
Playlist frequency and UI translation
src/server/MapPlaylist.ts, resources/lang/en.json
Adds IndianSubcontinent: 8 to playlist FREQUENCY and map.indiansubcontinent → "Indian Subcontinent" to English translations.
Supporting region and country data
resources/countries.json
Adds three region entries: Azad Kashmir, Jammu and Kashmir, and Sikkim with code, continent: "Asia", and name fields.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • openfrontio/OpenFrontIO#3935: Adds a new map end-to-end and updates the same integration points (GameMapType, mapCategories, MapPlaylist.FREQUENCY, map-generator, translations).
  • openfrontio/OpenFrontIO#3920: Similar map onboarding flow updating generator registration, game types, playlist frequency, and language resources.

Suggested reviewers

  • evanpelle

Poem

From Kashmir's ridge to Bengal's sea,
New flags and coordinates roam free,
Manifests, assets, and enums align,
A subcontinent added in code and design.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly summarizes the main change: adding a new Indian Subcontinent map to the codebase.
Description check ✅ Passed The description comprehensively explains the map addition, including geographical features, scale, and rationale for the Indian playerbase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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.

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: 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/indiansubcontinent/info.json`:
- Around line 51-52: Update the JSON entry where the "name" key currently has
the misspelled value "Andamar & Nicobar Islands" and change it to the correct
"Andaman & Nicobar Islands" so manifests and in-game labels are generated with
the correct nation name; locate the object containing the "name" key with that
exact value and replace only the value string.

In `@src/core/game/Game.ts`:
- Line 241: The GameMapType.IndianSubcontinent entry is currently placed in the
regional maps list but should be in the continental maps list; move the
GameMapType.IndianSubcontinent item from the regional/MapTypeRegional array into
the continental/MapTypeContinental collection (or change the classification
logic that builds continental vs regional lists to include
GameMapType.IndianSubcontinent) so it is categorized as continental and displays
under the correct map 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: 51900fe6-dda2-4e1a-a446-7c9abc7a339c

📥 Commits

Reviewing files that changed from the base of the PR and between c82b078 and 48d5e79.

⛔ Files ignored due to path filters (7)
  • map-generator/assets/maps/indiansubcontinent/image.png is excluded by !**/*.png
  • resources/flags/Azad Kashmir.svg is excluded by !**/*.svg
  • resources/flags/Jammu and Kashmir.svg is excluded by !**/*.svg
  • resources/flags/Sikkim.svg is excluded by !**/*.svg
  • resources/maps/indiansubcontinent/map.bin is excluded by !**/*.bin
  • resources/maps/indiansubcontinent/map16x.bin is excluded by !**/*.bin
  • resources/maps/indiansubcontinent/map4x.bin is excluded by !**/*.bin
📒 Files selected for processing (8)
  • map-generator/assets/maps/indiansubcontinent/info.json
  • map-generator/main.go
  • resources/countries.json
  • resources/lang/en.json
  • resources/maps/indiansubcontinent/manifest.json
  • resources/maps/indiansubcontinent/thumbnail.webp
  • src/core/game/Game.ts
  • src/server/MapPlaylist.ts

Comment thread map-generator/assets/maps/indiansubcontinent/info.json Outdated
Comment thread src/core/game/Game.ts
@github-project-automation github-project-automation Bot moved this from Triage to Development in OpenFront Release Management May 20, 2026
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.

🧹 Nitpick comments (1)
map-generator/assets/maps/indiansubcontinent/info.json (1)

249-252: ⚡ Quick win

Consider renaming "New Delhi" to "Delhi" for administrative consistency.

All other entries represent states, provinces, or administrative divisions (Kerala, Tamil Nadu, Punjab, etc.), but "New Delhi" is technically the capital city within the National Capital Territory of Delhi. For consistency with other administrative divisions on this map, consider using "Delhi" or "National Capital Territory of Delhi" instead of "New Delhi".

If highlighting the capital city is intentional for gameplay balance or recognition, this is fine—just noting the pattern difference.

🤖 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 `@map-generator/assets/maps/indiansubcontinent/info.json` around lines 249 -
252, Rename the "name" value for the entry with coordinates [978, 550]
(currently "New Delhi") to be consistent with other administrative divisions—use
"Delhi" or "National Capital Territory of Delhi" in the "name" field; keep the
rest of the object (coordinates and "flag": "in") unchanged so only the
displayed label is updated.
🤖 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 `@map-generator/assets/maps/indiansubcontinent/info.json`:
- Around line 249-252: Rename the "name" value for the entry with coordinates
[978, 550] (currently "New Delhi") to be consistent with other administrative
divisions—use "Delhi" or "National Capital Territory of Delhi" in the "name"
field; keep the rest of the object (coordinates and "flag": "in") unchanged so
only the displayed label is updated.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 222441d9-b15b-4581-bf60-07f987007ff4

📥 Commits

Reviewing files that changed from the base of the PR and between 48d5e79 and 38dc3bb.

📒 Files selected for processing (2)
  • map-generator/assets/maps/indiansubcontinent/info.json
  • resources/maps/indiansubcontinent/manifest.json
✅ Files skipped from review due to trivial changes (1)
  • resources/maps/indiansubcontinent/manifest.json

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.

1 participant