Skip to content

Update ExprGameRule #7943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

erenkarakal
Copy link
Member

@erenkarakal erenkarakal commented Jun 12, 2025

Problem

  • isSingle always returns false even if a single value is returned
  • Before setting a gamerule, it doesn't check if the gamerule can be assigned to the given value, which prints errors during runtime.

Solution

Fixed the problems and updated the outdated code. Also adds runtime errors for when you use a wrong value for a gamemode (ex. boolean for spawnRadius)

Testing Completed

on load:
  set {_w} to world("world")
  set gamerule spawnRadius of {_w} to 5.3
  broadcast whether gamerule spawnRadius of {_w} is 5

  set gamerule spawnRadius of {_w} to 6
  broadcast whether gamerule spawnRadius of {_w} is 6

  set gamerule doFireTick of {_w} to true
  broadcast whether gamerule doFireTick of {_w} is true

  set {_} to gamerule spawnRadius of {_w}

  # errors
  set gamerule doFireTick of {_w} to 5
  set gamerule spawnRadius of {_w} to true
  set {_} to gamerule spawnRadius of {_w} and {_w}

Completes: #7939
Related: none

@erenkarakal erenkarakal requested a review from a team as a code owner June 12, 2025 16:54
@erenkarakal erenkarakal requested review from Burbulinis and TheMug06 and removed request for a team June 12, 2025 16:54
@skriptlang-automation skriptlang-automation bot added the needs reviews A PR that needs additional reviews label Jun 12, 2025
@APickledWalrus APickledWalrus linked an issue Jun 12, 2025 that may be closed by this pull request
1 task
@skriptlang-automation skriptlang-automation bot removed the needs reviews A PR that needs additional reviews label Jun 12, 2025
erenkarakal and others added 2 commits June 12, 2025 20:57
Co-authored-by: burbulinis <131194155+Burbulinis@users.noreply.github.com>
Co-authored-by: burbulinis <131194155+Burbulinis@users.noreply.github.com>
@Efnilite Efnilite added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Jun 12, 2025
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.

couple last things

Co-authored-by: Patrick Miller <apickledwalrus@icloud.com>
@APickledWalrus APickledWalrus added the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Jul 2, 2025
@APickledWalrus APickledWalrus moved this to Awaiting Merge in 2.12 Releases Jul 2, 2025
@github-project-automation github-project-automation bot moved this from Awaiting Merge to In Review in 2.12 Releases Jul 4, 2025
@github-project-automation github-project-automation bot moved this from In Review to Awaiting Merge in 2.12 Releases Jul 4, 2025
@APickledWalrus APickledWalrus merged commit 4a97f91 into SkriptLang:dev/feature Jul 8, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from Awaiting Merge to Done in 2.12 Releases Jul 8, 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 Jul 8, 2025
Burbulinis pushed a commit to Burbulinis/Skript that referenced this pull request Jul 9, 2025
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. completed The issue has been fully resolved and the change will be in the next Skript update.
Projects
Status: Done - Released
Development

Successfully merging this pull request may close these issues.

ExprGameRule issues
6 participants