Commit Graph

376 Commits

Author SHA1 Message Date
flow
941d75824a
refactor: add instance creation abstraction and move vanilla
This is so that 1. Code is more cleanly separated, and 2. Allows to more
easily add instance updating :)

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20 18:32:36 -03:00
Sefa Eyeoglu
07dcefabcb
feat: add texture pack parsing
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-09-20 10:26:15 +02:00
jopejoe1
29dcb9d274 Added Launch Demo button.
Signed-off-by: jopejoe1 <johannes@joens.email>
2022-09-15 18:44:18 -03:00
flow
f65d506f26
Merge pull request #997 from flowln/fix_major_version_filter 2022-09-07 10:34:50 -03:00
flow
333dbca01e
Merge pull request #1105 from flowln/better_resource_packs
Add basic resource pack parsing and fix issues
2022-09-07 08:30:36 -03:00
flow
42eb265624
refactor: create mod pages and filter widget by factory methods
This takes most expensive operations out of the constructors.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-07 08:29:58 -03:00
flow
1b0ca47682
Merge pull request #939 from flowln/mod_downloader_improve
Some more UI / UX improvements to the mod downloader!
2022-09-07 08:27:11 -03:00
flow
8e3f5c3305
Merge pull request #966 from flowln/refactor_tasks
Reduce code duplication in tasks, fix some bugs and add some tests
2022-09-07 08:26:28 -03:00
Sefa Eyeoglu
8e3356f11a
Merge pull request #1034 from Scrumplex/detect-performance-features 2022-09-05 17:45:17 +02:00
flow
43a7af3f44
fix: removing mods with their metadata as well
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03 13:37:23 -03:00
flow
afa1a5e932
feat: modify InfoFrame and ResourcePackPage to show ResourcePack info
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-03 13:37:21 -03:00
flow
7b6d269904
refactor: make NetJob inherit from ConcurrentTask as well!
Avoids lots of code duplication

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28 16:29:01 -03:00
Sefa Eyeoglu
f371ec210c
Merge pull request #1052 from flowln/resource_model 2022-08-28 16:52:53 +02:00
DioEgizio
13184eb8e9 fix: fix urls on ftb legacy
Signed-off-by: DioEgizio <83089242+DioEgizio@users.noreply.github.com>
2022-08-24 12:31:38 +02: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
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
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
Sefa Eyeoglu
afb9ebcd99
fix: distinguish Coremods
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-08-20 12:53:13 +02:00
Sefa Eyeoglu
7e8644430c
Merge pull request #1007 from Gingeh/disable-update-button 2022-08-20 12:50:19 +02:00
timoreo
c375e7b4df
Merge pull request #897 from jamierocks/atl-updating-initial 2022-08-11 08:50:05 +02:00
Robb
cebac3c10e
Make new title strings translatable
Signed-off-by: Robb <computerguy440+gh@gmail.com>
2022-08-10 12:07:24 -05:00
Robb
cd30f75173
fix: Make world safety nag title text match the action being performed instead of always saying 'Copy World'
Signed-off-by: Robb <computerguy440+gh@gmail.com>
2022-08-09 16:01:21 -05:00
Sefa Eyeoglu
68f3f98bc3
feat: detect GameMode and MangoHud's presence
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-08-08 21:16:37 +02:00
Sefa Eyeoglu
f873cd5b1a
refactor: store current capabilities
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-08-08 21:16:37 +02:00
Gingeh
a8aa862919 Move large condition into a new lambda
Signed-off-by: Gingeh <39150378+Gingeh@users.noreply.github.com>
2022-08-03 16:39:30 +10:00
Gingeh
f33b31e048 Check for running instance when re-opening the mod folder page and when selecting mods
Signed-off-by: Gingeh <39150378+Gingeh@users.noreply.github.com>
2022-08-02 14:14:45 +10:00
Gingeh
0d10ebb7ca Update launcher/ui/pages/instance/ModFolderPage.h
Co-authored-by: flow <flowlnlnln@gmail.com>
Signed-off-by: Gingeh <39150378+Gingeh@users.noreply.github.com>
2022-08-02 12:50:25 +10:00
flow
4a8abc948e
fix: prevent segfault due to callbacks into deleted objects
Since network requests are, for the most part, asynchronous, there's a
chance a request only comes through after the request sender has already
been deleted.

This adds a global (read static) hash table relating models for the mod
downloader to their status (true = alive, false = destroyed). It is a
bit of a hack, but I couldn't come up with a better way of doing this.

To reproduce the issue before this commit: scroll really quickly through
CF mods, to trigger network requests for their versions and description.
Then, in the middle of it close the mod downloader. Sometimes this will
create a crash.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 18:34:15 -03:00
Gingeh
77b640b76b Disable "Check for Updates" and "Download Mods" while the game is running
Signed-off-by: Gingeh <39150378+Gingeh@users.noreply.github.com>
2022-08-01 20:56:05 +10:00
Gingeh
a8dfe98b1a Disable "Check for Updates" if all mods are removed
Signed-off-by: Gingeh <39150378+Gingeh@users.noreply.github.com>
2022-08-01 20:56:05 +10:00
flow
cee41b87f7
fix(ui): force redraw of mod list when (de)selecting a mod
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 07:33:31 -03:00
flow
6aaf1f4f21
feat: lazy-load CF mod descriptions
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 07:33:30 -03:00
flow
0808a10b7b
feat: cache mod versions
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 07:33:30 -03:00
flow
6f052baa94
refactor: use function cb instead of class cb in getVersions
I've discovered even more functional programming! :^)

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 07:33:30 -03:00
flow
5bc67d3f6b
feat: cache extra mod info (like links and body)
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 07:33:30 -03:00
flow
74c6c5cfbc
refactor: use function cb instead of class cb in getModInfo
I've discovered functional programming :^)
This makes this route more fit for general use.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 07:33:30 -03:00
flow
158b7fd166
feat+refactor: clean up ProgressWidget and add progress indicatior to
mod downloader

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 07:33:30 -03:00
flow
c3f647dc96
feat: add (semi) instant searching in mod downloader
It has a delay of 350ms from the last typed character to search, in
order to cache small changes while typing.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 07:33:30 -03:00
flow
5936c7b65c
change: preserve search term across different mod providers
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 07:33:29 -03:00
flow
a8bcd85c93
feat+refactor: add shortcuts to mod downloader and clean up
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 07:33:29 -03:00
flow
6e9a27f40f
feat: display the 'body' of a MR mod on the mod downloader
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 07:33:29 -03:00
flow
4a13dbe3bb
feat: create delegate for project item views
This allows us to define custom painting for list view items. In
particular, this is applied to the mod downloader, in order to allow
displaying both the mod name and mod description, and settings their
effects (like bold or underline) independent of each other.

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-01 07:33:29 -03:00
Sefa Eyeoglu
fb289c6b17
chore: add license headers
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-26 20:33:29 +02:00
Sefa Eyeoglu
75a7ea55d4
feat: implement mod resolving for FTB
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-26 20:33:10 +02:00
flow
3aa2003951
fix: filter in external resource pages not working
For some reason, using setFilterFixedString() doesn't seem to update the
QRegularExpression object with a new value, instead leaving it empty. It
updates QRegExp just fine, so maybe that's an Qt bug? o.O

Anyway, using regex in the filter is kinda cool actually :D

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-23 23:50:56 -03:00
flow
813dfbd2d3
fix: hide the entire performance tab on instance settings in non-Linux
"just woke up after a major release has just been made" coding style

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-23 13:29:39 -03:00
Sefa Eyeoglu
28ae5d710e
fix: fix translations for mod updater
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-07-19 18:03:45 +02:00
flow
de9e304236
fix: std::list -> QList
Qt6 removed Qlist::toStdList() 😭

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:45 -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
9a07ede615
fix: filter out opted-out mods in mod downloader
Maintains Pre-Updater behaviour

Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17 11:33:43 -03:00