Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c016f4d
Update to 1.34.1
MatrikMoon Mar 23, 2024
4a61f37
Merge branch 'ssl-tauri-discord' into ssl-tauri-discord-1.34
MatrikMoon Apr 4, 2024
329c065
I... I think this fixes the Span<T> error?
MatrikMoon Apr 11, 2024
3ed23f3
Merge branch 'ssl-tauri-discord' into ssl-tauri-discord-1.34
MatrikMoon Apr 15, 2024
4520ee0
Fix merge
MatrikMoon Apr 15, 2024
fdb5a91
Merge branch 'ssl-tauri-discord' into ssl-tauri-discord-1.34
MatrikMoon Apr 19, 2024
c38be76
Update reflection
MatrikMoon Apr 19, 2024
755141e
Merge branch 'ssl-tauri-discord' into ssl-tauri-discord-1.34
MatrikMoon May 6, 2024
c7b5cea
Switch updater to target 1.34
MatrikMoon May 6, 2024
ed923a6
Merge branch 'ssl-tauri-discord' into ssl-tauri-discord-1.34
MatrikMoon May 6, 2024
9158dea
Merge branch 'ssl-tauri-discord' into ssl-tauri-discord-1.34
MatrikMoon Jun 14, 2024
3d89a25
Fix 1.34-specific bugs
MatrikMoon Jun 14, 2024
b50c03f
Merge branch 'ssl-tauri-discord' into ssl-tauri-discord-1.34
MatrikMoon Jun 14, 2024
608fbf7
Merge branch 'ssl-tauri-discord' into ssl-tauri-discord-1.34
MatrikMoon Jun 14, 2024
4c5ee4a
Merge branch 'ssl-tauri-discord' into ssl-tauri-discord-1.34
MatrikMoon Sep 7, 2024
b92cc1a
Merge branch 'ssl-tauri-discord' into ssl-tauri-discord-1.34
MatrikMoon Sep 10, 2024
524690f
Merge branch 'ssl-tauri-discord' into ssl-tauri-discord-1.34
MatrikMoon Sep 16, 2024
fc5d6dd
Merge branch 'ssl-tauri-discord' into ssl-tauri-discord-1.34
MatrikMoon Oct 1, 2024
a83b8ee
Merge branch 'ssl-tauri-discord' into ssl-tauri-discord-1.34
MatrikMoon Oct 18, 2024
aedd099
Merge branch 'ssl-tauri-discord' into ssl-tauri-discord-1.34
MatrikMoon Oct 19, 2024
4d7cf0d
Merge branch 'ssl-tauri-discord' into ssl-tauri-discord-1.34
MatrikMoon Nov 9, 2024
7c16b60
First Look at updating to 38
ModdingPink Nov 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions TournamentAssistant/Behaviors/SharedCoroutineStarter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
using System.Runtime.CompilerServices;
using UnityEngine;

/**
* Taken with love from Zingabopp's BeatSaberPlaylistsLib
*/

namespace TournamentAssistant.Behaviors
{
// Mostly a copy-paste of PersistentSingleton<T> from game version < 1.31.0.
internal class SharedCoroutineStarter : MonoBehaviour
{
private static SharedCoroutineStarter _instance;
private static object _lock = new object();
private static bool _applicationIsQuitting;

public static SharedCoroutineStarter instance
{
get
{
if (_applicationIsQuitting)
{
Debug.LogWarning("[Singleton] Instance '" + nameof(SharedCoroutineStarter) + "' already destroyed on application quit. Won't create again - returning null.");
return null;
}

lock (_lock)
{
if (_instance == null)
{
_instance = FindObjectOfType<SharedCoroutineStarter>();

if (FindObjectsOfType<SharedCoroutineStarter>().Length > 1)
{
Debug.LogError("[Singleton] Something went really wrong - there should never be more than 1 singleton! Reopening the scene might fix it.");
return _instance;
}

if (_instance == null)
{
GameObject obj = new GameObject();
_instance = obj.AddComponent<SharedCoroutineStarter>();
obj.name = nameof(SharedCoroutineStarter);
DontDestroyOnLoad(obj);
}
}

return _instance;
}
}
}

protected void OnEnable()
{
DontDestroyOnLoad(this);
}

protected virtual void OnDestroy()
{
_applicationIsQuitting = true;
}
}
}
2 changes: 1 addition & 1 deletion TournamentAssistant/ILRepack.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="ILRepacker" AfterTargets="Build">
<ItemGroup>
<InputAssemblies Include="$(OutputPath)$(AssemblyName).dll" />
<InputAssemblies Include="$(OutputPath)$(AssemblyName).dll" />
<InputAssemblies Include="$(OutputPath)TournamentAssistantShared.dll" />
<InputAssemblies Include="$(OutputPath)protobuf-net.dll" />
<InputAssemblies Include="$(OutputPath)protobuf-net.Core.dll" />
Expand Down
5 changes: 3 additions & 2 deletions TournamentAssistant/Interop/CustomNotesInterop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ static class CustomNotesInterop
{
public static void EnableHMDOnly()
{
CustomNotes.Utilities.LayerUtils.EnableHMDOnly();
// Disabled until CustomNotes updates for 1.34.2
// CustomNotes.Utilities.LayerUtils.EnableHMDOnly();
}

public static void DisableHMDOnly()
{
CustomNotes.Utilities.LayerUtils.DisableHMDOnly();
// CustomNotes.Utilities.LayerUtils.DisableHMDOnly();
}
}
}
9 changes: 5 additions & 4 deletions TournamentAssistant/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using TournamentAssistantShared;
using TournamentAssistantShared.Models;
using TournamentAssistantShared.SimpleJSON;
using TournamentAssistantShared.Utilities;
using UnityEngine;
using UnityEngine.SceneManagement;
using Config = TournamentAssistantShared.Config;
Expand Down Expand Up @@ -175,7 +176,7 @@ private static void InitScoreSaber()

private void CreateMenuButton()
{
MenuButtons.instance.RegisterButton(menuButton);
MenuButtons.Instance.RegisterButton(menuButton);
}

private void MenuButtonPressed()
Expand All @@ -184,7 +185,7 @@ private void MenuButtonPressed()
_tournamentSelectionCoordinator = BeatSaberUI.CreateFlowCoordinator<TournamentSelectionCoordinator>();
_tournamentSelectionCoordinator.DidFinishEvent += tournamentSelectionCoordinator_DidFinishEvent;

_mainFlowCoordinator.PresentFlowCoordinatorOrAskForTutorial(_tournamentSelectionCoordinator);
_mainFlowCoordinator.InvokeMethod("PresentFlowCoordinatorOrAskForTutorial", _tournamentSelectionCoordinator);
}

private void tournamentSelectionCoordinator_DidFinishEvent()
Expand All @@ -197,9 +198,9 @@ private void tournamentSelectionCoordinator_DidFinishEvent()

public void Dispose()
{
if (MenuButtons.IsSingletonAvailable && MenuButtons.instance)
if (MenuButtons.Instance != null)
{
MenuButtons.instance.UnregisterButton(menuButton);
MenuButtons.Instance.UnregisterButton(menuButton);
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions TournamentAssistant/PluginClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ public class PluginClient(string endpoint, int port) : TAClient(endpoint, port)
public string CurrentMatch { get; set; }

public event Func<IBeatmapLevel, Task> LoadedSong;
public event Func<IPreviewBeatmapLevel, BeatmapCharacteristicSO, BeatmapDifficulty, GameplayModifiers, PlayerSpecificSettings, OverrideEnvironmentSettings, ColorScheme, bool, bool, bool, bool, Task> PlaySong;
public event Func<BeatmapLevel, BeatmapKey, GameplayModifiers, PlayerSpecificSettings, OverrideEnvironmentSettings, ColorScheme, bool, bool, bool, bool, Task> PlaySong;

protected override async Task Client_PacketReceived(Packet packet)
{

await base.Client_PacketReceived(packet);

if (packet.packetCase == Packet.packetOneofCase.Command)
Expand Down Expand Up @@ -90,7 +91,8 @@ await UnityMainThreadTaskScheduler.Factory.StartNew(() =>
: EnvironmentEffectsFilterPreset.AllEffects,
playSong.GameplayParameters.PlayerSettings.Options.HasFlag(PlayerOptions.StaticLights)
? EnvironmentEffectsFilterPreset.NoEffects
: EnvironmentEffectsFilterPreset.AllEffects
: EnvironmentEffectsFilterPreset.AllEffects,
0.7f
);
}

Expand Down
Loading