Commit Graph

10 Commits

Author SHA1 Message Date
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
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
flow
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
flow
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
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
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
4439666e67
feat: allow disabling mod metadata usage 2022-05-23 14:42:28 -03:00
flow
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