Skip to content

Honor declared map dimensions in world patterns - #86

Open
civilwarinfrance wants to merge 2 commits into
pythonarcade:developmentfrom
civilwarinfrance:fix/world-pattern-map-dimensions
Open

civilwarinfrance wants to merge 2 commits into
pythonarcade:developmentfrom
civilwarinfrance:fix/world-pattern-map-dimensions

Conversation

@civilwarinfrance

Copy link
Copy Markdown

World patterns currently reuse the grid multipliers as each map's dimensions, ignoring the documented mapWidth and mapHeight overrides. Read each declared size and fall back to its multiplier only when omitted. Keep placement based on the original multipliers and offsets, and add the two size keys as optional TypedDict fields.

Specification: https://doc.mapeditor.org/en/stable/manual/worlds/#showing-only-direct-neighbors

Five regressions fail upstream and the default-size control passes. Tests check width-only, height-only, both, explicit zero values, filename matching, and unchanged negative-coordinate placement through parse_world. All 132 full-suite tests pass. Mypy, Black, and isort pass; Ruff and flake8 add no findings compared with upstream.

AI-assisted by Codex (GPT-6); prepared and tested by the assistant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant