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
ec62d8e973
refactor: move general code from mod model to its own model
...
This aims to continue decoupling other types of resources (e.g. resource
packs, shader packs, etc) from mods, so that we don't have to
continuously watch our backs for changes to one of them affecting the
others.
To do so, this creates a more general list model for resources, based on
the mods one, that allows you to extend it with functionality for other
resources.
I had to do some template and preprocessor stuff to get around the
QObject limitation of not allowing templated classes, so that's sadge :c
On the other hand, I tried cleaning up most general-purpose code in the
mod model, and added some documentation, because it looks nice :D
Signed-off-by: flow <flowlnlnln@gmail.com >
2022-08-20 10:45:01 -03:00
2f5e55bea0
fix: only remove orphaned metadata on first opening
...
This avoids deleting the metadata while one is updating their mods.
Signed-off-by: flow <flowlnlnln@gmail.com >
2022-08-11 13:11:56 -03:00
31ba1de53b
fix: remove orphaned metadata to avoid problems with auto-updating insts
...
Just as my master has taught me. 🔫
Signed-off-by: flow <flowlnlnln@gmail.com >
2022-08-02 16:15:39 -03:00
54b335711a
fix: raw-pointers and leaks in ModFolderLoadTask
...
Co-authored-by: timoreo <contact@timoreo.fr >
Signed-off-by: flow <flowlnlnln@gmail.com >
2022-07-17 11:56:23 -03:00
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
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
a53ee2e35c
fix: mod parsing of 'String-fied' version (i.e. OpenBlocks)
...
Signed-off-by: flow <flowlnlnln@gmail.com >
2022-07-17 11:33:43 -03:00
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
dfab55112b
feat: remove existing mod when updating/redownloading it
...
Signed-off-by: flow <flowlnlnln@gmail.com >
2022-07-17 11:33:42 -03:00
e6b1a1fa76
Merge pull request #716 from flowln/mod_perma_2
...
Hide index folder on Windows
2022-06-14 23:58:35 +10:00
349fc4143d
Merge pull request #714 from Scrumplex/fix-tests
...
Fix mod metadata tests
2022-06-13 23:10:35 +02:00
4448418b63
fix: segfault when the same mod is present enabled and disabled at once
...
This maintains the previous behaviour
2022-06-12 09:44:03 -03:00
9f1f37e780
fix: correctly handle disabled mods with metadata
...
im stupid
2022-06-12 09:25:25 -03:00
a4ef0940ed
chore: add license headers
2022-06-12 13:50:58 +02:00
8856c8cd62
refactor(test): fix loading mod metadata setting
2022-06-12 13:33:17 +02:00
c2a43c6f40
fix: hide .index folder on Windows
2022-06-04 11:02:59 -03:00
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
3a923060ce
fix: use correct hash_type when creating metadata
...
also fix: wrong parameter name in LocalModUpdateTask's constructor
also fix: correct hash_format in CF
2022-05-23 14:58:14 -03:00
e17b6804a7
fix: implement PR suggestions
...
Some stylistic changes, and get hashes from the mod providers when
building the metadata.
2022-05-23 14:43:09 -03:00
96e36f0604
refactor: make mod metadata presence (or lack of) easier to find out
2022-05-23 14:43:09 -03:00
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
d7f6b36990
test+fix: add basic tests and fix issues with it
2022-05-23 14:42:28 -03:00
4439666e67
feat: allow disabling mod metadata usage
2022-05-23 14:42:28 -03:00
fab4a7a602
refactor: abstract metadata handling and clarify names
2022-05-23 14:42:28 -03:00
e9fb566c07
refactor: remove unused mod info and organize some stuff
2022-05-23 14:42:27 -03:00
5a34e8fd7c
refactor: move mod tasks to their own subfolder
...
Makes the launcher/minecraft/mod/ folder a little more organized.
2022-05-23 14:42:27 -03:00