Skip to content

Add dungeon map.#4208

Open
af-inet wants to merge 1 commit into
openfrontio:mainfrom
af-inet:map-dungeon
Open

Add dungeon map.#4208
af-inet wants to merge 1 commit into
openfrontio:mainfrom
af-inet:map-dungeon

Conversation

@af-inet

@af-inet af-inet commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Resolves #4162

Description:

  • Adds "Dungeon" map. The size is 2048x1344 with land area of 946,048.
  • "Corridors" implemented as grid tiles allow for port trading, while also making it impossible to entirely deny land access - this will force players to "crawl" through the dungeon corridors when water control denies ships
  • Features a Seven-pointed star, Dragon and Sword cosmetic features.
img1

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

Please put your Discord username so you can be contacted if a bug or regression is found:

agrippa.lich

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: 669dfe0f-7235-438b-b229-670805d1c6cb

📥 Commits

Reviewing files that changed from the base of the PR and between d7b788e and d6d6c83.

⛔ Files ignored due to path filters (4)
  • map-generator/assets/maps/dungeon/image.png is excluded by !**/*.png
  • resources/maps/dungeon/map.bin is excluded by !**/*.bin
  • resources/maps/dungeon/map16x.bin is excluded by !**/*.bin
  • resources/maps/dungeon/map4x.bin is excluded by !**/*.bin
📒 Files selected for processing (5)
  • map-generator/assets/maps/dungeon/info.json
  • resources/lang/en.json
  • resources/maps/dungeon/manifest.json
  • resources/maps/dungeon/thumbnail.webp
  • src/core/game/Maps.gen.ts
✅ Files skipped from review due to trivial changes (4)
  • src/core/game/Maps.gen.ts
  • resources/lang/en.json
  • resources/maps/dungeon/manifest.json
  • map-generator/assets/maps/dungeon/info.json

Walkthrough

Adds a new "Dungeon" map: manifest and generator info defining dimensions and eight named nations with coordinates, registry entries (enum + maps array) exposing GameMapType.Dungeon, and an English translation entry "map.dungeon".

Changes

Dungeon Map Data

Layer / File(s) Summary
Map manifest and info
resources/maps/dungeon/manifest.json, map-generator/assets/maps/dungeon/info.json
Adds Dungeon manifest (dimensions, map16x/map4x, multiplayer_frequency) and info.json, both listing eight named nations with coordinates.
GameMapType enum and maps registry
src/core/game/Maps.gen.ts
Adds Dungeon to GameMapType and inserts a MapInfo entry for Dungeon in the exported maps array with translationKey: "map.dungeon", categories: ["other"], and multiplayerFrequency: 8.
English map translation
resources/lang/en.json
Adds "dungeon": "Dungeon" to the map translations object.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • evanpelle
  • RickD004

Poem

Dungeon halls in JSON laid,
Eight named realms in shadowed glade,
Enum and manifest now sing,
A translation gives the map its name,
Ready for players to wade. 🗺️

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The PR adds dungeon map metadata and registry entries with correct dimensions and translation keys, but binary map files cannot be verified as they were excluded by path filters. Verify that the binary map files (map.bin, map16x.bin, map4x.bin) with dimensions 2048x1344 and land area 946,048 contain the corridors, seven-pointed star, dragon, and sword cosmetic features as specified in issue #4162.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly describes the main change: adding a new dungeon map to the game.
Description check ✅ Passed The description is directly related to the changeset, providing context about the Dungeon map implementation, dimensions, gameplay mechanics, and cosmetic features.
Out of Scope Changes check ✅ Passed All code changes are directly related to adding the Dungeon map and its associated metadata, translations, and registry entries.
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.

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.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed due to a network error.


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 `@src/core/game/Game.ts`:
- Line 163: Add unit tests covering the new GameMapType.Dungeon enum and its
inclusion in mapCategories: create tests that import GameMapType and
mapCategories from src/core/game/Game (or the module that exports them), assert
that GameMapType contains the "Dungeon" member, and assert that mapCategories
includes the Dungeon value in the expected category list; also include any
serialization/deserialization or switch/lookup behavior that relies on
GameMapType (e.g., functions that map types to display names or allowed
features) to ensure the new enum value is handled. Ensure the tests live under
the src/core/ test suite, follow existing test patterns, and run with the
project test command.
- Line 163: The new enum value "Dungeon" was inserted between "Dyslexdria" and
"GreatLakes", which can shift numeric values for downstream serialization; move
"Dungeon" out of the middle and append it to the end of the enum declaration
(instead of inserting between Dyslexdria and GreatLakes), and update any
serialization/mapping logic that assumes enum order to reference names/explicit
values if needed to preserve backward compatibility.
🪄 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: b6000218-d4c9-41c7-b1b3-ca5becc6c10d

📥 Commits

Reviewing files that changed from the base of the PR and between 3552b08 and f710606.

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

Comment thread src/core/game/Game.ts Outdated
@github-project-automation github-project-automation Bot moved this from Triage to Development in OpenFront Release Management Jun 10, 2026
@RickD004 RickD004 added this to the Backlog milestone Jun 10, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 10, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 12, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 12, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

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

⚠️ Outside diff range comments (1)
map-generator/assets/maps/dungeon/info.json (1)

1-41: ⚠️ Potential issue | 🟠 Major

Add Dungeon map credit to CREDITS.md

  • CREDITS.md has no entries for “Dungeon” and no “agrippa.lich” reference.
  • Add the Dungeon map/design source and license/permission to CREDITS.md (and credit “agrippa.lich” if they are the author/rights holder), or document why no attribution is needed.
🤖 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/dungeon/info.json` around lines 1 - 41, The
CREDITS.md file is missing attribution for the Dungeon map (id "Dungeon",
translation_key "map.dungeon"); add an entry that cites the map/design source
and license or permission, crediting agrippa.lich if they are the author/rights
holder (or explicitly state why no attribution is required), and include any
URL, license name, and short note of permission; update CREDITS.md accordingly
so Dungeon and agrippa.lich are documented.

Source: Learnings

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

Outside diff comments:
In `@map-generator/assets/maps/dungeon/info.json`:
- Around line 1-41: The CREDITS.md file is missing attribution for the Dungeon
map (id "Dungeon", translation_key "map.dungeon"); add an entry that cites the
map/design source and license or permission, crediting agrippa.lich if they are
the author/rights holder (or explicitly state why no attribution is required),
and include any URL, license name, and short note of permission; update
CREDITS.md accordingly so Dungeon and agrippa.lich are documented.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a57d0c71-7a12-430a-9d47-e4058c0ed0ce

📥 Commits

Reviewing files that changed from the base of the PR and between 5015773 and d7b788e.

📒 Files selected for processing (4)
  • map-generator/assets/maps/dungeon/info.json
  • resources/lang/en.json
  • resources/maps/dungeon/manifest.json
  • src/core/game/Maps.gen.ts
✅ Files skipped from review due to trivial changes (3)
  • src/core/game/Maps.gen.ts
  • resources/maps/dungeon/manifest.json
  • resources/lang/en.json

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 12, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
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.

Add map: Dungeon

2 participants