aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/Mod.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/minecraft/mod/Mod.cpp')
-rw-r--r--launcher/minecraft/mod/Mod.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/launcher/minecraft/mod/Mod.cpp b/launcher/minecraft/mod/Mod.cpp
index 9cd0056c..c495cd47 100644
--- a/launcher/minecraft/mod/Mod.cpp
+++ b/launcher/minecraft/mod/Mod.cpp
@@ -43,6 +43,7 @@
#include "MetadataHandler.h"
#include "Version.h"
+#include "minecraft/mod/ModDetails.h"
static ModPlatform::ProviderCapabilities ProviderCaps;
@@ -70,6 +71,10 @@ void Mod::setMetadata(std::shared_ptr<Metadata::ModStruct>&& metadata)
m_local_details.metadata = metadata;
}
+void Mod::setDetails(const ModDetails& details) {
+ m_local_details = details;
+}
+
std::pair<int, bool> Mod::compare(const Resource& other, SortType type) const
{
auto cast_other = dynamic_cast<Mod const*>(&other);
@@ -204,3 +209,8 @@ auto Mod::provider() const -> std::optional<QString>
return ProviderCaps.readableName(metadata()->provider);
return {};
}
+
+bool Mod::valid() const
+{
+ return !m_local_details.mod_id.isEmpty();
+}