Add dependencies section to skripts #6564
Labels
enhancement
Feature request, an issue about something that could be improved, or a PR improving something.
priority: lowest
"Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).
up for debate
When the decision is yet to be debated on the issue in question
Suggestion
It would be so useful to be able to define a Skript as dependent on another so that it is ALWAYS loaded after its dependencies, no matter its position in the directory tree.
I know that by organizing the directory tree, one can define the order in which scripts are loaded, but it would be very, very useful for servers that use a lot of scripts, or for those who share their resources on SkUnity, etc. Because everyone manages their directory tree as they wish according to their needs, and I think we should be able to define a mandatory loading order in the configuration of Skript.
We could add a new section in the scripts, like "dependencies," which allows Skript to understand that this script must be put in a waiting list until the other scripts on which it depends are not loaded.
This could also be used with plugins, to load scripts after a plugin is loaded because there's a lot of issues when using externals API with skript-reflect (for example, ItemsAdder always loads after Skript which causes many issues).
This system could work in the following way:
An option should be added in config.sk to enable or disable this, such as 'enable-dependencies'. If this is disabled, the classic method of Skript would be retained, which would allow those who do not need this type of loading not to use it, as it could potentially be longer.
Why?
Useful for servers that manage many scripts, or for those who share their resources which depend on other resources.
Other
Example:
Agreement
The text was updated successfully, but these errors were encountered: