Skip to content

Commit

Permalink
Entitlement check don't believe BeatSaver on chroma
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-r-elp committed Sep 5, 2024
1 parent 9a8ce96 commit 178c05c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Objects/MpEntitlementChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ namespace MultiplayerCore::Objects {
return GlobalNamespace::EntitlementsStatus::Ok;
}

// TODO: Check packet for the map

// Check beatsaver for the map
auto beatmapRes = BeatSaver::API::GetBeatmapByHash(std::string(levelHash));
if (beatmapRes.DataParsedSuccessful()) {
Expand All @@ -154,11 +156,12 @@ namespace MultiplayerCore::Objects {

std::list<std::string> requirements;
for (const auto& diff : beatmapVersion->GetDiffs()) {
// if (diff.GetChroma()) requirements.emplace_back("Chroma");
// if (diff.GetChroma()) requirements.emplace_back("Chroma"); // Ignore as BeatSaver marks Suggestions and Requirements, we only need requirements
if (diff.GetME()) requirements.emplace_back("Mapping Extensions");
if (diff.GetNE()) requirements.emplace_back("Noodle Extensions");
}

// TODO: Also check packet for Chroma requirement
for (const auto& req : requirements) {
if (!SongCore::API::Capabilities::IsCapabilityRegistered(req)) {
DEBUG("Missing requirement {}", req);
Expand Down

0 comments on commit 178c05c

Please sign in to comment.