mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
made release type visible
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
9e85297f7a
commit
9aac8e389f
9 changed files with 38 additions and 10 deletions
|
|
@ -47,6 +47,7 @@
|
|||
#include "minecraft/mod/ModDetails.h"
|
||||
#include "minecraft/mod/Resource.h"
|
||||
#include "minecraft/mod/tasks/LocalModParseTask.h"
|
||||
#include "modplatform/ModIndex.h"
|
||||
|
||||
static ModPlatform::ProviderCapabilities ProviderCaps;
|
||||
|
||||
|
|
@ -132,6 +133,13 @@ std::pair<int, bool> Mod::compare(const Resource& other, SortType type) const
|
|||
return { compare_result, type == SortType::MC_VERSIONS };
|
||||
break;
|
||||
}
|
||||
case SortType::RELEASE_TYPE: {
|
||||
if (releaseType() > cast_other->releaseType())
|
||||
return { 1, type == SortType::RELEASE_TYPE };
|
||||
else if (releaseType() < cast_other->releaseType())
|
||||
return { -1, type == SortType::RELEASE_TYPE };
|
||||
break;
|
||||
}
|
||||
}
|
||||
return { 0, false };
|
||||
}
|
||||
|
|
@ -262,6 +270,13 @@ auto Mod::side() const -> Metadata::ModSide
|
|||
return Metadata::ModSide::UniversalSide;
|
||||
}
|
||||
|
||||
auto Mod::releaseType() const -> ModPlatform::IndexedVersionType
|
||||
{
|
||||
if (metadata())
|
||||
return metadata()->releaseType;
|
||||
return ModPlatform::IndexedVersionType::VersionType::Unknown;
|
||||
}
|
||||
|
||||
auto Mod::loaders() const -> ModPlatform::ModLoaderTypes
|
||||
{
|
||||
if (metadata())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue