Commit Graph

23 Commits

Author SHA1 Message Date
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
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
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
91a5c4bdcb
feat: add metadata get/delete via mod id
This is, in many cases, more reliable than name comparisons, so it's
useful specially in cases where a mod changes name between versions

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:43 -03:00
flow
dfab55112b
feat: remove existing mod when updating/redownloading it
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:42 -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
Sefa Eyeoglu
349fc4143d
Merge pull request #714 from Scrumplex/fix-tests
Fix mod metadata tests
2022-06-13 23:10:35 +02: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
Sefa Eyeoglu
a4ef0940ed
chore: add license headers 2022-06-12 13:50:58 +02:00
Sefa Eyeoglu
8856c8cd62
refactor(test): fix loading mod metadata setting 2022-06-12 13:33:17 +02: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
4439666e67
feat: allow disabling mod metadata usage 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