aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/Mod.h
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-06-04 23:11:25 -0300
committerflow <flowlnlnln@gmail.com>2022-06-12 09:25:21 -0300
commit40ccd1a46910012f80285f7b6982a5919e2a9dcf (patch)
treeadf3638518722804784437954bdceae8cd6c3682 /launcher/minecraft/mod/Mod.h
parentc4f2e3a95584d9c50544a978a83650f8f83551fa (diff)
downloadPrismLauncher-40ccd1a46910012f80285f7b6982a5919e2a9dcf.tar.gz
PrismLauncher-40ccd1a46910012f80285f7b6982a5919e2a9dcf.tar.bz2
PrismLauncher-40ccd1a46910012f80285f7b6982a5919e2a9dcf.zip
fix: handling of incomplete mods
(i.e. mods without ModDetails that may have metadata)
Diffstat (limited to 'launcher/minecraft/mod/Mod.h')
-rw-r--r--launcher/minecraft/mod/Mod.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/launcher/minecraft/mod/Mod.h b/launcher/minecraft/mod/Mod.h
index 96d471b4..5f9c4684 100644
--- a/launcher/minecraft/mod/Mod.h
+++ b/launcher/minecraft/mod/Mod.h
@@ -73,8 +73,8 @@ public:
auto authors() const -> QStringList;
auto status() const -> ModStatus;
- auto metadata() const -> const std::shared_ptr<Metadata::ModStruct> { return details().metadata; };
- auto metadata() -> std::shared_ptr<Metadata::ModStruct> { return m_localDetails->metadata; };
+ auto metadata() -> std::shared_ptr<Metadata::ModStruct>;
+ auto metadata() const -> const std::shared_ptr<Metadata::ModStruct>;
void setStatus(ModStatus status);
void setMetadata(Metadata::ModStruct* metadata);
@@ -109,6 +109,10 @@ protected:
/* If the mod has metadata, this will be filled in the constructor, and passed to
* the ModDetails when calling finishResolvingWithDetails */
std::shared_ptr<Metadata::ModStruct> m_temp_metadata;
+
+ /* Set the mod status while it doesn't have local details just yet */
+ ModStatus m_temp_status = ModStatus::NotInstalled;
+
std::shared_ptr<ModDetails> m_localDetails;
bool m_enabled = true;