Skip to content

WXYZ property and handler reorganization#8274

Merged
sovdeeth merged 7 commits intoSkriptLang:dev/featurefrom
sovdeeth:feature/wxyz-property
Dec 27, 2025
Merged

WXYZ property and handler reorganization#8274
sovdeeth merged 7 commits intoSkriptLang:dev/featurefrom
sovdeeth:feature/wxyz-property

Conversation

@sovdeeth
Copy link
Member

@sovdeeth sovdeeth commented Nov 5, 2025

Problem

Many things have coordinates. Vanilla Skript includes 3 currently, Location, Vector, and Quaternion, though Chunk should also be included. Unifying these under a single property removes the confusion of x component vs x coordinate and allows many more types to use the x of syntax.

Solution

Adds a property for WXYZ components, where the handler is able to declare which axes it supports.
I've also tried to sneak in 40 other files worth of reorganization changes, moving Handlers out to their own classes to avoid another massive DefaultX-like class. These have no functional impact, and can mostly be ignored when reviewing.

I decided on a combined WXYZ property for boilerplate's sake. I had a separate property for each axis, which does lower complexity for each individual handler, but leads to a lot of duplicated code between each one for each class. Since most things in Skript will deal with at least 2 axis and normally 3 or more, I thought it simpler for the user to just combine the property into one. If anyone has good arguments against this, I'm all ears.

Testing Completed

All prior behavior is maintained via existing tests. Manual testing confirms interactions with things like player velocity.

Supporting Information

Breaking changes: removes [vector|quaternion] from the component syntax (vector x of {var})


Completes: none
Related: none

@sovdeeth sovdeeth requested review from a team as code owners November 5, 2025 08:21
@sovdeeth sovdeeth added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Nov 5, 2025
@sovdeeth sovdeeth requested review from Burbulinis, UnderscoreTud and cheeezburga and removed request for a team November 5, 2025 08:21
@sovdeeth sovdeeth moved this to In Review in 2.14 Releases Nov 5, 2025
@sovdeeth sovdeeth added the breaking changes Pull or feature requests that contain breaking changes (API, syntax, etc.) label Nov 5, 2025
Copy link
Member

@Efnilite Efnilite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will take a closer look later, looks good on first glance

Copy link
Contributor

@Absolutionism Absolutionism left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is targeting dev/feature, shouldn't the usages of
if (!SkriptConfig.useTypeProperties.value())
be removed? As the 2.13 release message stated properties were fully coming out in 2.14

@sovdeeth
Copy link
Member Author

sovdeeth commented Nov 5, 2025

Since this is targeting dev/feature, shouldn't the usages of
if (!SkriptConfig.useTypeProperties.value())
be removed? As the 2.13 release message stated properties were fully coming out in 2.14

I don't want to do that until we're sure properties is ready for full release, so it'll be a different pr

sovdeeth and others added 2 commits November 5, 2025 20:08
Co-authored-by: Efnilite <35348263+Efnilite@users.noreply.github.com>
Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
…XYZHandler.java

Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
Copy link
Member

@APickledWalrus APickledWalrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work

@skriptlang-automation skriptlang-automation bot added the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Dec 23, 2025
@APickledWalrus APickledWalrus moved this from In Review to Awaiting Merge in 2.14 Releases Dec 23, 2025
@sovdeeth sovdeeth merged commit 64b1407 into SkriptLang:dev/feature Dec 27, 2025
9 checks passed
@github-project-automation github-project-automation bot moved this from Awaiting Merge to Done - Awaiting Release in 2.14 Releases Dec 27, 2025
@skriptlang-automation skriptlang-automation bot added completed The issue has been fully resolved and the change will be in the next Skript update. and removed feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. labels Dec 27, 2025
@APickledWalrus APickledWalrus moved this from Done - Awaiting Release to Done - Released in 2.14 Releases Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking changes Pull or feature requests that contain breaking changes (API, syntax, etc.) completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something.

Projects

Status: Done - Released

Development

Successfully merging this pull request may close these issues.

4 participants