Feat/sable#825
Open
Rythian2277 wants to merge 3 commits into
Open
Conversation
- 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>
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.
PLEASE READ THE GUIDELINES BEFORE MAKING A CONTRIBUTION
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
scanShipsandscanShipCostwith a brand newgetShipto allow the detector to access information about the ship it is currently placed on.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
isInColonywill 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: