aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/Mod.h
AgeCommit message (Collapse)Author
2023-01-07Merge pull request #576 from Ryex/identify-zip-packsSefa Eyeoglu
fix https://github.com/PrismLauncher/PrismLauncher/issues/349
2022-12-29refactor(Mods): make provider() return a std::optionalflow
This makes it easier to check if a mod has a provider or not, without having to do a string comparison. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-12-24feat: add a `ModUtils::validate`Rachel Powers
moves the reading of mod files into `ModUtils` namespace Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2022-12-15feat: add a provider column to the mods pageleo78913
Signed-off-by: leo78913 <leo3758@riseup.net>
2022-08-20change: add enable/disable to resourcesflow
TIL that zip resource packs, when disabled, actually have the effect of not showing up in the game at all. Since this can be useful to someone, I moved the logic for it to the resources. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20refactor: simplify Mod structureflow
No need to keep track of pointers left and right. A single one already gives enough headaches! Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20fix: don't give shared pointer to obj. external to the modelflow
It causes some weird problems and adds refcounting overhead. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20refactor: adapt rest of the codebase to the new resource modelflow
In order to access the ModFolderModel from the ModFolderPage, i created a new m_model for the correct type, shadowing the m_model of type ResourceFolderModel. This creates two shared_ptr references to the same object, but since they will have the same lifetime, it doesn't generate a memory leak. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20refactor: move more tied logic to model and move logic to the resourcesflow
This moves the QSortFilterProxyModel to the resource model files, acessible via a factory method, and moves the sorting and filtering to the objects themselves, decoupling the code a bit. This also adds a basic implementation of methods in the ResourceFolderModel, simplifying the process of constructing a new model from it. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20refactor: move general info from Mod to Resourceflow
This allows us to create other resources that are not Mods, but can still share a significant portion of code. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17change: use ModStatus as a simple member instead of a pointerflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17change: make Mod a QObject used as a pointerflow
Prevents problems when copying it around! Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17change: mod metadata improvementsflow
- Use slug instead of name - Keep temporary status before having local details Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17change: allow deleting mods while preserving their metadataflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-06-12fix: handling of incomplete modsflow
(i.e. mods without ModDetails that may have metadata)
2022-05-23chore: add license headersflow
Prevents a massive inload of Scrumplex ditto's :) I didn't add it to every file modified in this PR because the other changes are pretty minor, and would explode the diff of the PR. I hope that's not a problem O_O
2022-05-23refactor: make mod metadata presence (or lack of) easier to find outflow
2022-05-23tidy: apply clang-tidy to some filesflow
Mostly the ones created in this PR + Mod.h / Mod.cpp / ModDetails.h
2022-05-23test+fix: add basic tests and fix issues with itflow
2022-05-23feat: cache metadata in ModDetailsflow
Allows for more easy access to the metadata by outside entities
2022-05-23refactor: abstract metadata handling and clarify namesflow
2022-05-23refactor: remove unused mod info and organize some stuffflow
2022-05-23feat: use mod metadata for getting mod informationflow
For now this doesn't mean much, but it will help when we need data exclusive from the metadata, such as addon id and mod provider. Also removes the metadata when the mod is deleted, and make the Mod.h file a little more pleasing to look at :)
2021-07-25NOISSUE Flatten gui and logic libraries into MultiMCPetr Mrázek