Skip to content

Conversation

erenkarakal
Copy link
Member

@erenkarakal erenkarakal commented Sep 16, 2025

Problem

The problem is explained in detail in #2028, but the general idea is that having a global options file makes it easier to change static values across lots of script files.

Solution

Added a new options.sk file inside /plugins/Skript/globals/ folder. The entries inside are loaded into a static map.
Whenever replaceOptions is called, it checks if the script has that option first and returns it. If it doesn't, it gets the option from the static map instead. This lets scripts override global options.
You can also use sections just like the structure version.

Testing Completed

manual testing & unit tests


Completes: #2028
Related: none

@erenkarakal erenkarakal requested review from a team as code owners September 16, 2025 09:37
@erenkarakal erenkarakal requested review from APickledWalrus and Absolutionism and removed request for a team September 16, 2025 09:37
@skriptlang-automation skriptlang-automation bot added the needs reviews A PR that needs additional reviews label Sep 16, 2025
@erenkarakal erenkarakal added enhancement Feature request, an issue about something that could be improved, or a PR improving something. feature Pull request adding a new feature. and removed enhancement Feature request, an issue about something that could be improved, or a PR improving something. labels Sep 16, 2025
@erenkarakal erenkarakal linked an issue Sep 16, 2025 that may be closed by this pull request
@erenkarakal erenkarakal requested a review from sovdeeth October 15, 2025 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Pull request adding a new feature. needs reviews A PR that needs additional reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Suggestion] Global Options File

2 participants