Skip to content

Fix midpoint expression to use converted expressions#8644

Open
Dev-Xeiji wants to merge 1 commit into
SkriptLang:dev/patchfrom
Dev-Xeiji:master
Open

Fix midpoint expression to use converted expressions#8644
Dev-Xeiji wants to merge 1 commit into
SkriptLang:dev/patchfrom
Dev-Xeiji:master

Conversation

@Dev-Xeiji
Copy link
Copy Markdown

@Dev-Xeiji Dev-Xeiji commented May 11, 2026

Problem

The midpoint expression only worked properly when both inputs were already locations or vectors.
#8625

Solution

The expression now checks the possible return types using existing converters, then converts both inputs to the correct type during initialization. This allows values like blocks to be treated as locations when a valid converter exists.

PS: The actual midpoint calculation was left unchanged.

Testing Completed

Tested manually with two defined variables and confirmed that the midpoint expression now works when the blocks are converted to locations.

on load:
    set {-a} to block at location(0,0,0)
    set {-b} to block at location(10,10,10)
    broadcast midpoint of {-a} and {-b}

Supporting Information

image

Completes: #8625
Related: none
AI assistance: none

@Dev-Xeiji Dev-Xeiji requested a review from a team as a code owner May 11, 2026 21:09
@Dev-Xeiji Dev-Xeiji requested review from Pesekjak and cheeezburga and removed request for a team May 11, 2026 21:09
@skriptlang-automation skriptlang-automation Bot added needs reviews A PR that needs additional reviews needs triage An issue that hasn't been classified or verified yet labels May 11, 2026
@skriptlang-automation

This comment has been minimized.

@skriptlang-automation skriptlang-automation Bot added enhancement Feature request, an issue about something that could be improved, or a PR improving something. bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. and removed enhancement Feature request, an issue about something that could be improved, or a PR improving something. labels May 19, 2026
@skriptlang-automation skriptlang-automation Bot moved this to In Review in 2.15 Releases May 19, 2026
@skriptlang-automation skriptlang-automation Bot removed the needs triage An issue that hasn't been classified or verified yet label May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. needs reviews A PR that needs additional reviews

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

1 participant