Skip to content

Use actual tileset size for automatic room grid size calculation#2155

Merged
colinator27 merged 2 commits intoUnderminersTeam:masterfrom
CST1229:31x31
Jun 22, 2025
Merged

Use actual tileset size for automatic room grid size calculation#2155
colinator27 merged 2 commits intoUnderminersTeam:masterfrom
CST1229:31x31

Conversation

@CST1229
Copy link
Copy Markdown
Contributor

@CST1229 CST1229 commented Jun 20, 2025

(alt title: Fix incorrect calculated grid sizes in rooms with GMS2 tile layers)

Description

Previously, the automatic grid size calculation (if there's no global grid size set) determined the tile size by dividing the room size by the size of the tile layer in tiles, instead of using the tile width/height properties present on the tileset.
This doesn't work properly if a GMS2 tile layer isn't the exact same size as the room, which can happen through UTMT editing or through an extra row/column getting added for non-tile-size-divisible room sizes; for instance see tower_1 in Pizza Tower, which should have a grid size of 32x32 but is 31x31.
This PR fixes that.

Caveats

Didn't test much.

Notes

@github-actions
Copy link
Copy Markdown

@colinator27 colinator27 merged commit 64bfb57 into UnderminersTeam:master Jun 22, 2025
5 checks passed
@CST1229 CST1229 deleted the 31x31 branch June 27, 2025 23:35
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.

3 participants