v4.0.0 - Major Refactor
ModLoader has been refactored by @Qubus0. See PRs ##60, #62, and #63 for details.
Refactor
The refactor has split the old single file of mod_loader.gd into 4 files:
Filename | Description |
---|---|
mod_loader | Same as before: The main entry point that sets up mods. Loads mod data to the virtual filesystem, loops over them, and initialises them. |
mod_data | Stores and validates all Data required to load a mod successfully. If some of the data is invalid, [member is_loadable] will be false. |
mod_manifest | Stores and validates contents of the manifest (ie. Author-ModName/manifest.json). |
mod_loader_utils | All utility funcs have been moved to here, including logging and getting CLI args. |
Breaking Changes
- ModLoader has been moved to the
res://addons/
directory.- The new location is autoloaded in the same way the old one was, with the same file (mod_loader.gd).
- Nothing else needs to change in your autoloads. There are other new classes, but they'll be loaded automatically.
- Logging in mods is now handled via the ModLoaderUtils class, which provides a host of new logging options. The following changes will be needed in your mods:
ModLoader.mod_log
->ModLoaderUtils.log_info
ModLoader.dev_log
->ModLoaderUtils.log_debug
- See also: Breaking changes from v3.1.0
What's Changed
- README - Migrate content to wiki by @ithinkandicode in #57
- README - Fix wiki links by @ithinkandicode in #59
- Move mod_loader into an addon folder by @Qubus0 in #50
- Serialize into ModData and ModDetails by @Qubus0 in #60 (major change)
- Split off logging and utils by @Qubus0 in #62
- Move other utils by @Qubus0 in #63
- Minor fixes to
manifest
by @ithinkandicode in #64
Full Changelog: v3.1.0...v4.0.0