Skip to content

Feat/sable#825

Open
Rythian2277 wants to merge 3 commits into
IntelligenceModding:dev/0.8-1.21.1from
Rythian2277:feat/sable
Open

Feat/sable#825
Rythian2277 wants to merge 3 commits into
IntelligenceModding:dev/0.8-1.21.1from
Rythian2277:feat/sable

Conversation

@Rythian2277

@Rythian2277 Rythian2277 commented Jul 15, 2026

Copy link
Copy Markdown

PLEASE READ THE GUIDELINES BEFORE MAKING A CONTRIBUTION

  • Please check if the PR fulfills these requirements
  • The commit message are well described
  • Docs have been added / updated (for features or maybe bugs which were noted). If not, please update the needed documentation here. Feel free to remove this check if you don't need it
  • All changes have fully been tested
  • What kind of change does this PR introduce? (Bug fix, feature, ...)
    This PR introduces compatibility with Sable, the physics library depended on by Create Aeronautics (who went through and very nicely added native CC support to all of their blocks), allowing for Advanced Peripherals blocks to be used on physics contraptions.

When sable is not installed, behaviour is unchanged.

Environment Detector re-receives it's functionality surrounding scanShips and scanShipCost with a brand new getShip to allow the detector to access information about the ship it is currently placed on.

  • What is the current behavior? (You can also link to an open issue here)
    AP 0.8 is currently set up for Valkyrien Skies 2, which seems to have no plans on updating for 1.21.1.

A computer, with peripherals, placed onto a Sable sublevel would not function in any method that required positional information as sublevels are stored in a grid system at positions around the {2,000,000, y, 2,000,000} range. This means that using a function such as getPlayersInRange(radius) would always return 0.

Additionally, the Colony Integrator currently does not function at all when placed onto sublevels as isInColony will always return false, even when flying above a colony area.

  • What is the new behavior (if this is a feature change)?
    Peripherals will now correctly use their real-world positions when on Sable sublevels, and will correctly be able to work across sublevels.

  • Does this PR introduce a breaking change? (What changes might users need to make in their scripts due to this PR?)
    This has been created explicitly to not require any adjustments to existing code.

  • Other information:

- Added "Sable Companion" dependency.
- Added "SableHelper" class. This class will safely no-op if sable is absent, or if a computer is not placed onto a sublevel.
- Added "Sable" to `APAddon` , along with an integration plugin to load previously deprecated Environment Detector functions: `scanShips(radius)`, `scanShipCost(radius)`, and a new `getShip()` which will return the information of the ship the computer is currently placed on.

- Updated IPeripheralOwner to refer to `SableHelper` for `getPhysicsPos()` and `getDirection()`
- Updated BasePeripheral to refer to `SableHelper` for `isOnShip()`
Fixes issue where Pocket Computer and Smart Glasses peripherals would be unable to use modified peripheral functions.
Remove vscode directory

Signed-off-by: Rythian Smythe <rythian@rythian2277.dev>
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