Files
BreakEscape/js/core
Claude 4e9e8a26c7 fix: Remove grid alignment for multiple connections to fix door alignment
The previous fix attempted to position rooms based on door positions, but grid
alignment (alignToGrid) was rounding positions to 160px boundaries, breaking
the precise positioning needed for door alignment.

Issue: When test_mixed_room_sizes.json loaded, the closet room was positioned
at (-160, -256) but its door was at (48, -96). The door was 48px to the right
of the room's bounds, completely outside the room tiles.

Root cause: Grid alignment was rounding x=-32 to x=-160, shifting the room
160px to the left.

Solution: Remove alignToGrid calls for multiple room connections and use exact
positioning:
- North/South: roomX = doorX - edgeInset (positions room so door is at edgeInset from left)
- East/West: roomY = doorY - (TILE_SIZE * 2) (positions room so door is 2 tiles from top)

This ensures doors are positioned within room bounds and align properly between
different-sized rooms (e.g., 1×1 GU closet, 2×1 GU hall, 2×2 GU CEO office).
2025-11-17 01:39:44 +00:00
..
2025-11-14 19:47:54 +00:00