Skip to content

Fix minimap priority for impassable terrain pathfinding πŸ—ΊοΈ#4361

Merged
evanpelle merged 10 commits into
mainfrom
fix/impassable-minimap-priority
Jun 21, 2026
Merged

Fix minimap priority for impassable terrain pathfinding πŸ—ΊοΈ#4361
evanpelle merged 10 commits into
mainfrom
fix/impassable-minimap-priority

Conversation

@FloPinguin

Copy link
Copy Markdown
Contributor

Description:

Changes the minimap downscaling priority in the Go map generator from Impassable > Water > Land to Water > Impassable > Land.

Tristar noticed this bug and reported it in the discord map-maker-area:

Previously, any 2x2 block containing even one impassable tile would become impassable on the minimap, completely erasing narrow rivers inside or bordering impassable terrain. Since the water pathfinder runs on the minimap, this caused pathfinding failures near impassable terrain.

With water taking highest priority, narrow rivers are preserved on the minimap regardless of surrounding impassable terrain, ensuring the water pathfinder can route through them correctly.

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:

FloPinguin

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

πŸ’€ Files selected but had no reviewable changes (1)
  • resources/maps/losangeles/thumbnail.webp
β›” Files ignored due to path filters (2)
  • resources/maps/losangeles/map16x.bin is excluded by !**/*.bin
  • resources/maps/losangeles/map4x.bin is excluded by !**/*.bin
βš™οΈ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 00038528-56e5-4e4a-8727-544febfd4595

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 357c603 and 764cc13.

β›” Files ignored due to path filters (2)
  • resources/maps/losangeles/map16x.bin is excluded by !**/*.bin
  • resources/maps/losangeles/map4x.bin is excluded by !**/*.bin
πŸ“’ Files selected for processing (1)
  • resources/maps/losangeles/thumbnail.webp

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • πŸ” Trigger review

Walkthrough

In createMiniMap, the tile-combination priority during 2x2-to-1x1 downsampling is changed so Water now wins over Impassable (new order: Water > Impassable > Land). The loop adds explicit water-preservation checks, and the block's header comment is updated to match.

Changes

Minimap tile priority: Water > Impassable > Land

Layer / File(s) Summary
Water-first resolution logic and updated comment
map-generator/map_generator.go
The doc comment now states Water > Impassable > Land. The downscaling loop adds two water checks: keep dest if already water, overwrite dest with source if source is water. The existing Impassable-vs-Land rules run only after those checks pass.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Suggested reviewers

  • evanpelle

Poem

🌊 Water once bowed to the walls of stone,
Now it rises and claims what's its own.
Impassable yields β€” the sea takes the tile,
Minimap logic now flowing in style.
Water > Impassable β€” just check the file! πŸ—ΊοΈ

πŸš₯ Pre-merge checks | βœ… 5
βœ… Passed checks (5 passed)
Check name Status Explanation
Title check βœ… Passed The title accurately reflects the main change: fixing minimap priority for impassable terrain pathfinding. It is specific, clear, and directly related to the core issue addressed in the changeset.
Description check βœ… Passed The description is directly related to the changeset, providing context about the bug (Water priority affecting pathfinding), the fix (changing priority order), and rationale for the change.
Docstring Coverage βœ… Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

@evanpelle evanpelle merged commit cd9490a into main Jun 21, 2026
13 checks passed
@evanpelle evanpelle deleted the fix/impassable-minimap-priority branch June 21, 2026 21:38
@github-project-automation github-project-automation Bot moved this from Triage to Complete in OpenFront Release Management Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugfix Fixes a bug

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

2 participants