Some Sable compatibility fixes - #5396
Open
awakaxis wants to merge 4 commits into
Open
Conversation
gustovafing
requested changes
Sep 4, 2026
gustovafing
approved these changes
Sep 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This PR fixes two compatibility issues with Sable:
1. MetaMachineBlock doesn't apply the correct vertical rotations while being placed on a Sable SubLevel
This is due to how Sable places the SubLevel's plot at extreme coordinates. As a result, the distance checks in MetaMachineblock.getStateForPlacement incorrectly assume the player is very far away from the block they are placing, thereby preventing vertical placement.
3. MufflerPartMachine doesn't spawn particles at the right position when on a SubLevel that has been rotated in any way
The coordinates just dont align with the SubLevel's rotation / orientation, causing the visual bug.
Implementation Details
Both issues are solved with some simple coordinate transformations via SableCompanion's utilities
AI Usage
Outcome
How Was This Tested
The code in this PR was tested in game as I developed it, see attached images for the before/after screenshots of the two fixes:
MetaMachineBlock
Before: The machine, when attempting to place it vertically on a SubLevel, does not rotate correctly.

After: The machine now rotates correctly when placed vertically on a SubLevel.

MufflerPartMachine
Before: The particles are offset from where they would be if this EBF wasn't a SubLevel, a consequence of the SubLevel's rotation.

After: The particles now line up with the muffler when it's SubLevel has been rotated.

Additional Information
I'm new to PRing big projects like this, please let me know if anything is wrong.