Skip to content

v4.0.0 - Major Refactor

Compare
Choose a tag to compare
@ithinkandicode ithinkandicode released this 20 Jan 06:34
· 254 commits to main since this release
e67c7f7

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

Full Changelog: v3.1.0...v4.0.0