Skip to content

Commit

Permalink
update for beat saber 1.36.0
Browse files Browse the repository at this point in the history
  • Loading branch information
qe201020335 committed Apr 25, 2024
1 parent 4076b03 commit 7d3a3af
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
11 changes: 4 additions & 7 deletions SongRankedBadge/LevelListTableCellPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using TMPro;
using UnityEngine;
using UObject = UnityEngine.Object;
using Polyglot;
using BGLib.Polyglot;
using SongRankedBadge.Configuration;

namespace SongRankedBadge
Expand Down Expand Up @@ -38,18 +38,15 @@ public class LevelListTableCellPatch
};

[HarmonyPostfix]
static void Postfix(ref IPreviewBeatmapLevel level, ref bool isPromoted, GameObject ____promoBadgeGo)
static void Postfix(ref BeatmapLevel level, ref bool isPromoted, GameObject ____promoBadgeGo)
{
if (!PluginConfig.Instance.ModEnable) return;

RankStatus rankedStatus = RankStatus.None;
try
{
if (level is CustomPreviewBeatmapLevel customLevel)
{
var hash = SongCore.Utilities.Hashing.GetCustomLevelHash(customLevel);
rankedStatus = RankStatusManager.Instance.GetSongRankedStatus(hash);
}
var hash = SongCore.Utilities.Hashing.GetCustomLevelHash(level);
rankedStatus = RankStatusManager.Instance.GetSongRankedStatus(hash);
}
catch (Exception e)
{
Expand Down
10 changes: 6 additions & 4 deletions SongRankedBadge/SongRankedBadge.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,20 @@
<Reference Include="0Harmony">
<HintPath>$(BeatSaberDir)\Libs\0Harmony.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="BGLib.Polyglot">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.Polyglot.dll</HintPath>
</Reference>
<Reference Include="BSML">
<HintPath>$(BeatSaberDir)\Plugins\BSML.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="DataModels">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\DataModels.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>$(BeatSaberDir)\Libs\Newtonsoft.Json.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Polyglot">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Polyglot.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="SongCore">
<HintPath>$(BeatSaberDir)\Plugins\SongCore.dll</HintPath>
Expand Down
8 changes: 4 additions & 4 deletions SongRankedBadge/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"id": "SongRankedBadge",
"name": "SongRankedBadge",
"author": "qe201020335",
"version": "1.0.2",
"version": "1.0.2+1.36.0",
"description": "Show a map's rank status using the promotion badge thingy introduced in 1.28.0",
"gameVersion": "1.29.1",
"gameVersion": "1.36.0",
"dependsOn": {
"BSIPA": "^4.2.2",
"SongDetailsCache": "^1.2.2",
"SongCore": "^3.10.1",
"BeatSaberMarkupLanguage": "^1.6.9"
"SongCore": "^3.13.0",
"BeatSaberMarkupLanguage": "^1.9.0"
}
}

0 comments on commit 7d3a3af

Please sign in to comment.