Skip to content

Adds India map#3512

Open
RickD004 wants to merge 4 commits intoopenfrontio:mainfrom
RickD004:India
Open

Adds India map#3512
RickD004 wants to merge 4 commits intoopenfrontio:mainfrom
RickD004:India

Conversation

@RickD004
Copy link
Copy Markdown
Contributor

Description:

Adds India map. Map of the Indian Subcontinent, with indian states and surrounding countries, important rivers like the Ganges, Brahmaputra and Indus, and the Himalayas

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

Captura de pantalla 2026-03-12 204037 Captura de pantalla 2026-03-12 204155 Captura de pantalla 2026-03-12 204231

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 Mar 25, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c64624fc-9611-4ecf-87ac-18210837ab1a

📥 Commits

Reviewing files that changed from the base of the PR and between 368bb2e and 6ec9eb2.

📒 Files selected for processing (1)
  • resources/lang/en.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • resources/lang/en.json

Walkthrough

Adds India as a new playable map: new map assets and manifest, localization, map-generator registration, GameMapType enum entry, and playlist weighting for India.

Changes

Cohort / File(s) Summary
Map assets
map-generator/assets/maps/india/info.json
New JSON asset enumerating nations/regions with name, coordinates, and optional flag entries for the India map.
Map manifest
resources/maps/india/manifest.json
New manifest defining resolutions (map, map16x, map4x), dimensions, num_land_tiles, and the nations array for India.
Map registry
map-generator/main.go
Added {Name: "india"} to the map-generator maps list so the India asset is discovered and processed.
Localization
resources/lang/en.json
Added map.india: "India" localization entry.
Game types & categories
src/core/game/Game.ts
Added India = "India" to GameMapType and included it in mapCategories.regional.
Playlist weighting
src/server/MapPlaylist.ts
Added India: 5 to the map frequency weights used by buildMapsList, affecting playlist selection frequency.

Sequence Diagram(s)

sequenceDiagram
  participant MG as MapGenerator
  participant FS as Filesystem/Assets
  participant Server as GameServer
  participant Core as GameCore

  MG->>FS: add `map-generator/assets/maps/india/info.json` and register `{Name: "india"}`
  Note right of FS: `resources/maps/india/manifest.json` stored
  Server->>FS: load manifests & assets (includes india)
  Server->>Server: buildMapsList (uses frequency weights incl. India:5)
  Server->>Core: publish available maps (mapCategories includes India)
  Core->>Server: include India in playlists / selectable maps
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🗺️ A new India map placed on view,
Flags and pins in tidy queue,
JSON, manifest, enum align,
Playlists nudge the map in line,
Players set course for something new.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Adds India map' directly and clearly describes the main change: adding a new India map to the game.
Description check ✅ Passed The description clearly relates to the changeset, explaining the India map includes Indian states, surrounding countries, geographical features, and addresses regional representation gaps.
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.

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: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@map-generator/assets/maps/india/info.json`:
- Around line 199-203: Update the outdated "name" field for the JSON map entry
that currently reads "Uttaranchal" (the object with "coordinates": [1087, 290]
and "flag": "in") to the official modern name "Uttarakhand" so the map data
reflects the current state name.
- Around line 54-58: Fix the typo in the map metadata entry where the "name"
field reads "Andamar & Nicobar Islands": change it to "Andaman & Nicobar
Islands" for the object that currently has "coordinates": [1797, 1315] and
"flag": "in" in the JSON so the map label is correct.
- Around line 209-212: The Kashmir nation object is missing the required "flag"
property (used in Nation and read by GameView.ts via nation.flag); update the
Kashmir entry in info.json (the object with "name": "Kashmir" and "coordinates":
[804, 16]) to include a valid flag code (e.g., "flag": "in" or another
appropriate ISO code) so nation.flag is never undefined at runtime.

In `@resources/maps/india/manifest.json`:
- Around line 69-73: The "name" field in the manifest entry currently contains a
typo ("Andamar \u0026 Nicobar Islands"); update that value to "Andaman & Nicobar
Islands" so the manifest's name matches the corrected spelling used in info.json
(locate the JSON object with "flag": "in" and "coordinates": [1797, 1315] and
fix its "name" property).
- Around line 214-218: Replace the outdated state name "Uttaranchal" with the
correct "Uttarakhand" in the JSON entry that currently has "coordinates": [1087,
290], "flag": "in", "name": "Uttaranchal" (update the "name" value to
"Uttarakhand"); also make the same replacement in the corresponding entry in
info.json to keep both manifests consistent.
- Around line 224-227: The Kashmir nation object is missing the required flag
field from the Nation interface; add a flag property to the Kashmir entry (the
object with "name": "Kashmir") using the same format as the other entries — e.g.
include "flag": "kashmir.png" (or the appropriate flags/<name>.png/emoji string
used elsewhere) so the object satisfies the Nation interface.
🪄 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: aa1a3bfd-a9aa-4d6f-8fc0-8d02ddc48fec

📥 Commits

Reviewing files that changed from the base of the PR and between 4e126c2 and f944ed2.

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

@github-project-automation github-project-automation bot moved this from Triage to Development in OpenFront Release Management Mar 25, 2026
coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 25, 2026
@github-project-automation github-project-automation bot moved this from Development to Final Review in OpenFront Release Management Mar 25, 2026
coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Final Review

Development

Successfully merging this pull request may close these issues.

1 participant