Skip to content

Commit

Permalink
Merge pull request #24 from iPixelGalaxy/master
Browse files Browse the repository at this point in the history
Update to 1.34.0+
  • Loading branch information
Sirspam authored Feb 25, 2024
2 parents a89d9e7 + 67fff76 commit 190cdf4
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 29 deletions.
34 changes: 19 additions & 15 deletions Hitbloq/Hitbloq.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,16 @@
<HintPath>$(BeatSaberDir)\Plugins\LeaderboardCore.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PlatformUserModel">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\PlatformUserModel.dll</HintPath>
</Reference>
<Reference Include="PlaylistManager">
<HintPath>$(BeatSaberDir)\Plugins\PlaylistManager.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Tweening">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Tweening.dll</HintPath>
</Reference>
<Reference Include="Unity.TextMeshPro">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Unity.TextMeshPro.dll</HintPath>
<Private>False</Private>
Expand All @@ -58,18 +64,12 @@
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Main">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\Main.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="$(BeatSaberDir)\Beat Saber_Data\Managed\Main.dll" Publicize="True"/>
<Reference Include="HMLib">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\HMLib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="HMUI">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\HMUI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="$(BeatSaberDir)\Beat Saber_Data\Managed\HMUI.dll" Publicize="True"/>
<Reference Include="IPA.Loader">
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\IPA.Loader.dll</HintPath>
<Private>False</Private>
Expand Down Expand Up @@ -105,15 +105,15 @@
</ItemGroup>

<ItemGroup>
<None Include="Directory.Build.props" Condition="Exists('Directory.Build.props')"/>
<None Include="Directory.Build.targets" Condition="Exists('Directory.Build.targets')"/>
<None Include="Hitbloq.csproj.user" Condition="Exists('Hitbloq.csproj.user')"/>
<None Include="Directory.Build.props" Condition="Exists('Directory.Build.props')" />
<None Include="Directory.Build.targets" Condition="Exists('Directory.Build.targets')" />
<None Include="Hitbloq.csproj.user" Condition="Exists('Hitbloq.csproj.user')" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="manifest.json"/>
<EmbeddedResource Include="Images\*.png"/>
<EmbeddedResource Include="UI\Views\*.bsml"/>
<EmbeddedResource Include="manifest.json" />
<EmbeddedResource Include="Images\*.png" />
<EmbeddedResource Include="UI\Views\*.bsml" />
<EmbeddedResource Update="UI\Views\HitbloqPoolLeaderboardView.bsml">
<SubType>Code</SubType>
</EmbeddedResource>
Expand All @@ -123,13 +123,17 @@
</ItemGroup>

<ItemGroup>
<None Remove="UI\Views\HitbloqEventModal.bsml"/>
<None Remove="UI\Views\HitbloqEventModal.bsml" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="BeatSaberModdingTools.Tasks" Version="1.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion Hitbloq/Other/AutomaticRegistration.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Hitbloq.Entries;
using Hitbloq.Sources;
Expand Down Expand Up @@ -46,7 +47,7 @@ private async Task InitializeAsync()
}

// If a valid platform id doesn't exist, return
var userInfo = await _platformUserModel.GetUserInfo();
var userInfo = await _platformUserModel.GetUserInfo(CancellationToken.None);
if (userInfo == null)
{
return;
Expand Down
1 change: 1 addition & 0 deletions Hitbloq/Other/SpriteLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using BeatSaberPlaylistsLib;
using IPA.Loader;
using IPA.Utilities.Async;
using SiraUtil.Web;
Expand Down
2 changes: 1 addition & 1 deletion Hitbloq/Sources/UserIDSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public UserIDSource(IHttpService siraHttpService, IPlatformUserModel platformUse
{
if (_hitbloqUserID == null || RegistrationRequested)
{
var userInfo = await _platformUserModel.GetUserInfo();
var userInfo = await _platformUserModel.GetUserInfo(CancellationToken.None);
if (userInfo != null)
{
try
Expand Down
6 changes: 3 additions & 3 deletions Hitbloq/UI/HitbloqFlowCoordinator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ internal class HitbloqFlowCoordinator : FlowCoordinator

private FlowCoordinator? _parentFlowCoordinator;

protected override void DidActivate(bool firstActivation, bool addedToHierarchy, bool screenSystemEnabling)
public override void DidActivate(bool firstActivation, bool addedToHierarchy, bool screenSystemEnabling)
{
SetTitle("Hitbloq");
showBackButton = true;
Expand All @@ -55,7 +55,7 @@ protected override void DidActivate(bool firstActivation, bool addedToHierarchy,
_hitbloqInfoViewController.URLOpenRequested += OnURLOpenRequested;
}

protected override void DidDeactivate(bool removedFromHierarchy, bool screenSystemDisabling)
public override void DidDeactivate(bool removedFromHierarchy, bool screenSystemDisabling)
{
base.DidDeactivate(removedFromHierarchy, screenSystemDisabling);
_hitbloqPoolListViewController.PoolSelectedEvent -= OnPoolSelected;
Expand Down Expand Up @@ -112,7 +112,7 @@ private void OnURLOpenRequested(string url)
_popupModalsController.ShowYesNoModal(_hitbloqPoolListViewController.rectTransform, $"Would you like to open\n{url}", () => { Application.OpenURL(url); });
}

protected override void BackButtonWasPressed(ViewController topViewController)
public override void BackButtonWasPressed(ViewController topViewController)
{
_hitbloqRankedListViewController.gameObject.SetActive(false);
_hitbloqPoolLeaderboardViewController.gameObject.SetActive(false);
Expand Down
3 changes: 0 additions & 3 deletions Hitbloq/UI/MenuButtonUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ public MenuButtonUI(MainFlowCoordinator mainFlowCoordinator, HitbloqFlowCoordina

public void Dispose()
{
if (MenuButtons.IsSingletonAvailable)
{
MenuButtons.instance.UnregisterButton(_menuButton);
}
}

public void Initialize()
Expand Down
4 changes: 2 additions & 2 deletions Hitbloq/UI/ViewControllers/HitbloqPoolCellController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ await _spriteLoader.DownloadSpriteAsync(_poolListEntry.BannerImageURL, sprite =>
private readonly Color _textSelectedColor = new(0, 0.7529412f, 1, 1);
private readonly Color _textColor = new(1, 1, 1, 0.7490196f);

protected override void SelectionDidChange(TransitionType transitionType)
public override void SelectionDidChange(TransitionType transitionType)
{
RefreshBackground();
}

protected override void HighlightDidChange(TransitionType transitionType)
public override void HighlightDidChange(TransitionType transitionType)
{
RefreshBackground();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@ await _spriteLoader.DownloadSpriteAsync(_poolLeaderboardEntry.BannerImageURL, sp
private readonly Color _crColor = new(0.7254902f, 0.5294118f, 1, 0.7490196f);
private readonly Color _crHighlightedColor = new(0.7254902f, 0.5294118f, 1, 1f);

protected override void SelectionDidChange(TransitionType transitionType)
public override void SelectionDidChange(TransitionType transitionType)
{
RefreshBackground();
}

protected override void HighlightDidChange(TransitionType transitionType)
public override void HighlightDidChange(TransitionType transitionType)
{
RefreshBackground();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ private async Task ShowModalForUserAsync(CancellationToken cancellationToken, in
{
_addFriendButton.image.sprite = _friendAdded;
AddFriendInteractable = false;
AddFriendHoverHint = KAlreadyFriendPrompt + (await _platformUserModel.GetUserInfo()).platform;
AddFriendHoverHint = KAlreadyFriendPrompt + (await _platformUserModel.GetUserInfo(CancellationToken.None)).platform;
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Hitbloq/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"#![Hitbloq.Description.md]",
"Hitbloq offers a unique competitive experience for Beat Saber through its use of map pools and the relative ranking algorithm."
],
"gameVersion": "1.20.0",
"gameVersion": "1.34.0",
"icon": "Hitbloq.Images.Logo.png",
"dependsOn": {
"BSIPA": "^4.2.1",
Expand Down

0 comments on commit 190cdf4

Please sign in to comment.