Implement non-bundled mods #125

Merged
lucas merged 13 commits from feat/loose-files into master 2023-11-24 11:52:54 +01:00

13 commits

Author SHA1 Message Date
c8b08cc2cc
dtmm: Use dtmt.cfg for non-bundled mods
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
Closes #144.
2023-11-24 09:48:17 +01:00
8928d22bf6
Delay mod loading
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
The initial implementation of DML ended up loading mods quite late,
which did give it the benefit of all `Manager`s being available.
This change therefore moves mod loading until after those are
initialized.

But contrary to old DML, we still create a separate game state to make
sure the game doesn't advance until mods are loaded. This avoids race
conditions like the one where LogMeIn needs to come early in the load
order.
2023-11-23 20:28:36 +01:00
6a15519ed0
Prevent excessive debug logs 2023-11-23 20:28:34 +01:00
510cbcb8b4
Use version number from Nexus import
Non-bundled mods come without a `dtmt.cfg`, and therefore without a
version number. But we need a version number at import to compare to
for the Nexus update check.
2023-11-23 20:28:33 +01:00
2f746debf3
Use mod name from Nexus if necessary
Non-bundled mods come without `dtmt.cfg` and therefore no way to
provide a user friendly name. Similar to the other fields, use the one
from Nexus in that case.
2023-11-23 20:28:31 +01:00
b85d54ea1c
Fix Nexusmods API key not being loaded from config 2023-11-23 20:28:30 +01:00
e162f68457
Fix missing Mods.original_require 2023-11-23 20:28:28 +01:00
eee1f500b8
Use template engine to build mod_data.lua
The string-building version became too complex to maintain properly.
2023-11-23 20:28:27 +01:00
dfaa39cd54
Move deployment directory for legacy mods
This moves it back to its original place at `$game_dir/mods`.
2023-11-23 20:28:25 +01:00
3d7d301627
Implement deploying non-bundled mods
Closes #113.
2023-11-23 20:28:24 +01:00
266d63c20d
Apply clippy lints 2023-11-23 20:28:22 +01:00
8715cf5309
Apply formatting 2023-11-23 20:28:21 +01:00
e52c2b4cff
Add mod config option for loose files
Just the field in the config file, for now.
2023-11-23 20:28:20 +01:00