-
Notifications
You must be signed in to change notification settings - Fork 37
v6.0.0 #266
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
v6.0.0 #266
Conversation
Reworked the script extending process to take into account the vanilla inheritance chain before installing the extensions. With this, no script will be extended before a parent script. Dependency chain is still used before the inheritance checks.
Inheritance checks for script extensions
Added is_silent parameter to `is_name_or_namespace_valid()`, `is_semver_valid()`, `validate_dependencies_and_incompatibilities()`, `is_mod_id_valid()`. Can be used to not log an error if the validation returns `false`. Usefull for example if the validaiton is used in a text input where the result will be most of the times `false`. Implemented with the ModTool in mind.
refactor: ♻️ Added is_silent parameter to validation functions
add ScriptExtensionData in the setup
… incompatibilities
Cleanup: Remove trailing whitespace
Cleanup: Remove todos
Validation: Don't allow mods to include themselves as dependencies or incompatibilities
Config JSON: Swap status codes 1 and 2 (closes #131)
Misc: Add `code_note` func, to show a helpful message in `log_fatal`
Config JSON: Add API methods for saving data
Before: `save_dictionary_to_file` After: `save_dictionary_to_json_file`
Utility: Add 2 funcs for saving data to files
Misc: Uncomment `code_note` code in file saving API methods
Move classes to their own directory
* feat: ✨ option to allow autoload placement anywhere To make things work when `ModLoaderStore` is not placed before `ModLoader`, I had to move the check to the beginning of the `_init()` function. To handle the problem in `check_autoload_order()`, where I couldn't use `ModLoaderLog.fatal()` due to its reliance on a function that references `ModLoaderStore`, I directly loaded the ModLoader Options resource in `_check_autoload_positions()`. Check out issue #262 for more info. closes #257 * fix: 🐛 logs error if `ModLoaderStore` is not available closes #262
* refactor: ♻️ store Profile object instead of profile name This will make it easier to access all profile data of the current profile. Before, you always had to get the profile data from `ModLoaderStore.user_profiles`. closes #247 * refactor: ♻️ `ModLoaderUserProfile` methods use `ModUserProfile`
* fix: 🐛 removed `dir_exists()` check With this change, these functions will always return the full path to the config file/dir, even if the parent directory doesn't exist. Usually, this directory will be created later when the file is saved. closes #267 * fix: 🔥 Removed incorrect comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work everyone! 🥇 🥇 🥇 🥇
Tested with Brotato and fixed 2 bugs I encountered.
Once it's merged, I will share the release on the Brotato Discord.
Maybe we can get some beta testers to try it out.
and updated the deprecation message to point to `ModLoaderMod.get_mod_data_all()` instead of `ModLoaderMod.get_mod_data()`.
Fixed a bug where the path to the workshop directory was not set correctly.
* build: 🔥 remove git modules Since submodules are not included in the zip download, we need to remove the submodule for the JSON Schema Validator. For more details, refer to dear-github/dear-github#214. * build: 🔥 removed JSON_Schema_Validator submodule * build: ➕ Added JSON Schema Validator directly * build: 🔥 removed unused *json_file.gd*
Previously, the same log entry was only saved to the previous entry in `ModLoaderStore.logged_messages.all[logMD5]`. This change adds a check for an `existing_entry` and adds to the entry stacks in `ModLoaderStore.logged_messages.by_mod` and `ModLoaderStore.logged_messages.by_type`.
* docs: 📝 moved class description above class_name * docs: 📝 extended comments for docs * docs: 📝 extended comments for docs in `ModLoaderLog` * docs: 📝 extended comments for docs in `ModLoaderMod` * docs: 📝 comments for docs in `ModLoaderUserProfile` * docs: 📝 added backticks to example
* Transitive Comparator for script sorting The current algorithm returns a random result unless a is in b's type hierarchy. Random results are disallowed in the sort_custom API https://docs.godotengine.org/en/3.5/classes/class_array.html?highlight=sort_custom The new algorithm sorts alphabetically by names in the type hierarchy paths until one of the trees stop then it sorts the shorter tree first. Aims to fix the following errors that gets spammed at startup (and i think causes startup crashes): E 0:00:00.815 SortArray<class Variant,struct _ArrayVariantSortCustom,1>::partitioner: bad comparison function; sorting will be broken <C++ Source> .\core/sort_array.h:179 @ SortArray<class Variant,struct _ArrayVariantSortCustom,1>::partitioner() <Stack Trace> script_extension.gd:39 @ handle_script_extensions() mod_loader.gd:164 @ _load_mods() mod_loader.gd:67 @ _init() * reverse the type order to be ancestor first * Add static types, remove unused manual cache * pop the last ele
* refactor: 🚚 Moved methods handling mod state Moved the methods handling mod state from `ModLoaderMod` to `ModLoaderModManager`. Additionally, all getter methods inside `ModLoaderMod` have been moved together at the bottom. * refactor: ♻️ added `ModLoaderModManager` to `new_global_classes`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lesgo
ModLoaderConfig
- Error when creating first default config #267ModLoaderConfig
- Error Invalid get index 'name' when loading configs #268add_translation_from_resource
toadd_translation
#271get_mod_data_all()
#274logged_messages.all
#278ModLoaderMod
into a new classModLoaderModManager
#281closes #181