Commit Graph

25 Commits

Author SHA1 Message Date
Rachel Powers
ec157b766e feat(mod parsing): load extra mod details
- (image, license, issuetracker)

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2023-05-04 23:42:42 -07:00
Sefa Eyeoglu
f3f628410d
Merge pull request #576 from Ryex/identify-zip-packs
fix https://github.com/PrismLauncher/PrismLauncher/issues/349
2023-01-07 17:33:34 +01:00
flow
257970c27d
refactor(Mods): make provider() return a std::optional
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-29 13:21:49 -03:00
Rachel Powers
878614ff68 feat: add a ModUtils::validate
moves the reading of mod files into `ModUtils` namespace

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
2022-12-24 09:42:02 -07:00
leo78913
4ee29b388d feat: add a provider column to the mods page
Signed-off-by: leo78913 <leo3758@riseup.net>
2022-12-15 12:02:08 -03:00
flow
e2ab2aea32
change: add enable/disable to resources
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-20 10:49:54 -03:00
flow
e7cf9932a9
refactor: simplify Mod structure
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-20 10:48:51 -03:00
flow
92aa24ae34
fix: don't give shared pointer to obj. external to the model
It causes some weird problems and adds refcounting overhead.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-20 10:48:00 -03:00
flow
97a74d5c1f
refactor: adapt rest of the codebase to the new resource model
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-20 10:47:58 -03:00
flow
1e2f0ab308
refactor: move more tied logic to model and move logic to the resources
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-20 10:47:08 -03:00
flow
3225f514f6
refactor: move general info from Mod to Resource
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-08-20 10:41:59 -03:00
flow
650af5eb64
change: use ModStatus as a simple member instead of a pointer
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:44 -03:00
flow
c4316e81e6
change: make Mod a QObject used as a pointer
Prevents problems when copying it around!

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:44 -03:00
flow
fd6755c93f
change: mod metadata improvements
- Use slug instead of name
- Keep temporary status before having local details

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:43 -03:00
flow
43b9db6e45
change: allow deleting mods while preserving their metadata
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:41 -03:00
flow
40ccd1a469
fix: handling of incomplete mods
(i.e. mods without ModDetails that may have metadata)
2022-06-12 09:25:21 -03:00
flow
2fc1b99911
chore: add license headers
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-23 14:58:14 -03:00
flow
96e36f0604
refactor: make mod metadata presence (or lack of) easier to find out 2022-05-23 14:43:09 -03:00
flow
ba50765c30
tidy: apply clang-tidy to some files
Mostly the ones created in this PR + Mod.h / Mod.cpp / ModDetails.h
2022-05-23 14:42:28 -03:00
flow
d7f6b36990
test+fix: add basic tests and fix issues with it 2022-05-23 14:42:28 -03:00
flow
23febc6d94
feat: cache metadata in ModDetails
Allows for more easy access to the metadata by outside entities
2022-05-23 14:42:28 -03:00
flow
fab4a7a602
refactor: abstract metadata handling and clarify names 2022-05-23 14:42:28 -03:00
flow
e9fb566c07
refactor: remove unused mod info and organize some stuff 2022-05-23 14:42:27 -03:00
flow
fcfb2cfc3d
feat: use mod metadata for getting mod information
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 :)
2022-05-23 14:42:27 -03:00
Petr Mrázek
20b9f2b42a NOISSUE Flatten gui and logic libraries into MultiMC 2021-07-25 19:50:44 +02:00