QcBundledMods Namespace
Example mods shipped inside the app (the release bundle's Contents/Resources/mods). More...
| Header: | #include <worlds/QcBundledMods.h> |
Functions
| QString | directory(const QString &applicationDirectory) |
| QcResult<QStringList> | installDisabled(const QString &source, const QString &modsDirectory) |
Detailed Description
On the first start, when the player's mods directory does not exist yet, they are copied there switched off, so the Mods screen offers them; mods still load only from the player's mods directory.
Function Documentation
QString QcBundledMods::directory(const QString &applicationDirectory)
Returns the bundled mods next to the program in applicationDirectory: ../Resources/mods (macOS bundle), else mods; empty when neither exists.
QcResult<QStringList> QcBundledMods::installDisabled(const QString &source, const QString &modsDirectory)
Copies every mod directory (with a pack.json) of source into modsDirectory and disables each one there, but only when source holds a mod and modsDirectory does not exist yet. The copy is made in a new folder beside modsDirectory (<name>.installing-XXXXXX) and renamed when complete; on failure only that folder is removed. Linked mod folders and manifests, other links and special files are skipped. Returns the ids of the installed mods; an empty list when nothing was to be done.