Skip to content

Added 1 new map 2000x2000px (Movtoc) to Fantasy section#3409

Open
NightmareSHW wants to merge 1 commit intoopenfrontio:mainfrom
NightmareSHW:Movtoc-Map
Open

Added 1 new map 2000x2000px (Movtoc) to Fantasy section#3409
NightmareSHW wants to merge 1 commit intoopenfrontio:mainfrom
NightmareSHW:Movtoc-Map

Conversation

@NightmareSHW
Copy link

@NightmareSHW NightmareSHW commented Mar 12, 2026

Description:

Added 1 new map "Movtoc" to Fantasy section, created with https://github.com/Aotumuri/OpenfrontMapGenerator, edited as necessary with Paint, and assembled with https://github.com/TsProphet94/OpenFrontMapGenerator. Shouldn't be any copyright issues due to the random generation, map has been playtested ensure functionality.

15 nations by default.

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:

nightmareshw

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 12, 2026

Walkthrough

This pull request introduces a new game map type called "Movtoc" by adding translation entries, creating a manifest configuration file with map dimensions and 15 nations, and registering the new map type in the game's enum and fantasy category.

Changes

Cohort / File(s) Summary
Translation & Configuration
resources/lang/en.json, resources/maps/movtoc/manifest.json
Added "Movtoc" translation entry and created manifest file defining map dimensions (3 scales), land tile counts, and territorial layout with 15 nations including coordinates and names.
Game Type Definition
src/core/game/Game.ts
Registered new Movtoc enum member in GameMapType and added it to the fantasy map category.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🗺️ A new realm awakens on the game board,
Movtoc rises with nations restored,
Fifteen territories claim their place,
Where fantasy maps find their space! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding a new map called Movtoc to the Fantasy section with specific dimensions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description clearly relates to the changeset, explaining the addition of a new map 'Movtoc' to the Fantasy section with relevant details about its creation and testing.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📝 Coding Plan for PR comments
  • Generate coding plan

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/core/game/Game.ts (1)

142-208: ⚠️ Potential issue | 🟡 Minor

Fix indentation on line 207: use spaces instead of tab to match the rest of the fantasy array.

Line 207 uses a tab character while all surrounding lines use spaces, which will cause linting failures.

Additionally, Movtoc is not in the frequency map at src/server/MapPlaylist.ts. Maps with missing frequency entries default to 0 and won't appear in public rotation. If Movtoc should be selectable, add it to the frequency map with an appropriate value (other fantasy maps range from 3–8).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/core/game/Game.ts` around lines 142 - 208, Fix the tab indentation in the
fantasy map array by replacing the tab before GameMapType.Movtoc with spaces to
match the surrounding lines (maintain the existing indentation style for the
array), and add an entry for Movtoc in the map frequency mapping used by
MapPlaylist (the frequency map symbol) so GameMapType.Movtoc is not treated as
frequency 0—pick a value consistent with other fantasy maps (e.g., 5) and add
the key matching the map enum name.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@resources/lang/en.json`:
- Around line 345-346: The "movtoc" entry uses a tab for indentation; replace
the tab with spaces to match the surrounding JSON entries (same indentation as
the "aegean" line) so the file is consistently formatted, then save and re-run
prettier --check; locate the "aegean" and "movtoc" keys to make the correction.

In `@src/core/game/Game.ts`:
- Line 207: Line with the GameMapType enum entry (GameMapType.Movtoc) is
indented with a tab and fails Prettier; open src/core/game/Game.ts and replace
the tab indentation for the array item containing GameMapType.Movtoc with the
same space-based indentation used by the surrounding items so spacing is
consistent and Prettier passes (look for the array of map types in the Game
class or exported constant).

---

Outside diff comments:
In `@src/core/game/Game.ts`:
- Around line 142-208: Fix the tab indentation in the fantasy map array by
replacing the tab before GameMapType.Movtoc with spaces to match the surrounding
lines (maintain the existing indentation style for the array), and add an entry
for Movtoc in the map frequency mapping used by MapPlaylist (the frequency map
symbol) so GameMapType.Movtoc is not treated as frequency 0—pick a value
consistent with other fantasy maps (e.g., 5) and add the key matching the map
enum name.
🪄 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: 4b40e32a-b9a9-4a76-ab8a-34eaac5056e2

📥 Commits

Reviewing files that changed from the base of the PR and between 741a38c and 29edcd0.

⛔ Files ignored due to path filters (3)
  • resources/maps/movtoc/map.bin is excluded by !**/*.bin
  • resources/maps/movtoc/map16x.bin is excluded by !**/*.bin
  • resources/maps/movtoc/map4x.bin is excluded by !**/*.bin
📒 Files selected for processing (4)
  • resources/lang/en.json
  • resources/maps/movtoc/manifest.json
  • resources/maps/movtoc/thumbnail.webp
  • src/core/game/Game.ts

Comment on lines +345 to +346
"aegean": "Aegean",
"movtoc": "Movtoc"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix the indentation here to clear CI.

Line 346 uses a tab while the rest of this JSON block uses spaces, which matches the current Prettier warning in CI. Reformat this entry and rerun prettier --check.

🧰 Tools
🪛 GitHub Actions: 🧪 CI

[warning] Prettier formatting issues found by 'npx prettier --check .'. Run 'npx prettier --write .' to fix.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@resources/lang/en.json` around lines 345 - 346, The "movtoc" entry uses a tab
for indentation; replace the tab with spaces to match the surrounding JSON
entries (same indentation as the "aegean" line) so the file is consistently
formatted, then save and re-run prettier --check; locate the "aegean" and
"movtoc" keys to make the correction.

GameMapType.Surrounded,
GameMapType.TradersDream,
GameMapType.Passage,
GameMapType.Movtoc,
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use spaces here so Prettier passes.

Line 207 is indented with a tab, which matches the CI Prettier failure. Replace it with the same space indentation used by the surrounding array items.

🧰 Tools
🪛 GitHub Actions: 🧪 CI

[warning] Prettier formatting issues found by 'npx prettier --check .'. Run 'npx prettier --write .' to fix.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/core/game/Game.ts` at line 207, Line with the GameMapType enum entry
(GameMapType.Movtoc) is indented with a tab and fails Prettier; open
src/core/game/Game.ts and replace the tab indentation for the array item
containing GameMapType.Movtoc with the same space-based indentation used by the
surrounding items so spacing is consistent and Prettier passes (look for the
array of map types in the Game class or exported constant).

@github-project-automation github-project-automation bot moved this from Triage to Development in OpenFront Release Management Mar 12, 2026
@FloPinguin
Copy link
Contributor

I dont think we should add randomly generated maps to our map collection.
Instead we could add Aotumuris map generator into the game (On the fly random map generation, instantly playable).

@NightmareSHW
Copy link
Author

I dont think we should add randomly generated maps to our map collection. Instead we could add Aotumuris map generator into the game (On the fly random map generation, instantly playable).

I mean I completely agree, but I don't know enough about coding to make that happen. I would love to see it in the game though. I just wanted to contribute to the game since I enjoy it but I don't know how to do much else outside of map generation. Maybe I'll try to look into the tutorials on porting QGIS data for maps in the near future.

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.

3 participants