aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-06-25 10:41:29 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-06-25 10:41:29 +0300
commitce4a86fbcd0c891472b842e76066d285de3aef7b (patch)
tree33b246e0ac4d5d81aca7652d495ea2439f308a1c /launcher/minecraft/mod
parent54d7477679d4be05ce69dfe7d3ff21b0de46e8af (diff)
downloadPrismLauncher-ce4a86fbcd0c891472b842e76066d285de3aef7b.tar.gz
PrismLauncher-ce4a86fbcd0c891472b842e76066d285de3aef7b.tar.bz2
PrismLauncher-ce4a86fbcd0c891472b842e76066d285de3aef7b.zip
Made custom url function
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/minecraft/mod')
-rw-r--r--launcher/minecraft/mod/Mod.cpp7
-rw-r--r--launcher/minecraft/mod/Mod.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/launcher/minecraft/mod/Mod.cpp b/launcher/minecraft/mod/Mod.cpp
index e613ddeb..d5b96bad 100644
--- a/launcher/minecraft/mod/Mod.cpp
+++ b/launcher/minecraft/mod/Mod.cpp
@@ -166,6 +166,13 @@ auto Mod::homeurl() const -> QString
return details().homeurl;
}
+auto Mod::metaurl() const -> QString
+{
+ if (metadata() == nullptr)
+ return homeurl();
+ return ModPlatform::getMetaURL(metadata()->provider, metadata()->project_id);
+}
+
auto Mod::description() const -> QString
{
return details().description;
diff --git a/launcher/minecraft/mod/Mod.h b/launcher/minecraft/mod/Mod.h
index d4e419f4..d6272f4d 100644
--- a/launcher/minecraft/mod/Mod.h
+++ b/launcher/minecraft/mod/Mod.h
@@ -70,6 +70,7 @@ public:
auto provider() const -> std::optional<QString>;
auto licenses() const -> const QList<ModLicense>&;
auto issueTracker() const -> QString;
+ auto metaurl() const -> QString;
/** Get the intneral path to the mod's icon file*/
QString iconPath() const { return m_local_details.icon_file; };