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
Copy link
Copy Markdown

skriptlang-automation Bot commented May 11, 2026

🔍 Triage Checklist

Type

  • bug
  • feature
  • enhancement

Project

  • 2.15 Releases
  • 2.16 Releases

  • ✅ Mark as triaged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs reviews A PR that needs additional reviews needs triage An issue that hasn't been classified or verified yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant