Added 1 new map 2000x2000px (Movtoc) to Fantasy section#3409
Added 1 new map 2000x2000px (Movtoc) to Fantasy section#3409NightmareSHW wants to merge 1 commit intoopenfrontio:mainfrom
Conversation
|
|
WalkthroughThis 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan for PR comments
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: 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 | 🟡 MinorFix 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,
Movtocis not in the frequency map atsrc/server/MapPlaylist.ts. Maps with missing frequency entries default to 0 and won't appear in public rotation. IfMovtocshould 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
⛔ Files ignored due to path filters (3)
resources/maps/movtoc/map.binis excluded by!**/*.binresources/maps/movtoc/map16x.binis excluded by!**/*.binresources/maps/movtoc/map4x.binis excluded by!**/*.bin
📒 Files selected for processing (4)
resources/lang/en.jsonresources/maps/movtoc/manifest.jsonresources/maps/movtoc/thumbnail.webpsrc/core/game/Game.ts
| "aegean": "Aegean", | ||
| "movtoc": "Movtoc" |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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).
|
I dont think we should add randomly generated maps to our map collection. |
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. |
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:
Please put your Discord username so you can be contacted if a bug or regression is found:
nightmareshw