Skip to content

Commit

Permalink
Merge pull request #140 from NuggoDEV/dev/1.36.2
Browse files Browse the repository at this point in the history
Dev/1.36.2
  • Loading branch information
NuggoDEV authored May 8, 2024
2 parents 1b31755 + f9bea70 commit c633c1e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 15 deletions.
15 changes: 15 additions & 0 deletions Counters+/Counters+.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,25 @@
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\BeatmapCore.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="BeatSaber.GameSettings, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<Private>False</Private>
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\BeatSaber.GameSettings.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="BeatSaber.PerformancePresets, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<Private>False</Private>
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\BeatSaber.PerformancePresets.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="BGLib.AppFlow, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.AppFlow.dll</HintPath>
</Reference>
<Reference Include="BGLib.SaveDataCore, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<Private>False</Private>
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.SaveDataCore.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="BGLib.UnityExtension, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.UnityExtension.dll</HintPath>
Expand Down
4 changes: 2 additions & 2 deletions Counters+/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.3.6")]
[assembly: AssemblyFileVersion("2.3.6")]
[assembly: AssemblyVersion("2.3.7")]
[assembly: AssemblyFileVersion("2.3.7")]
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using BeatSaberMarkupLanguage;
using CountersPlus.ConfigModels;
using CountersPlus.UI.ViewControllers;
using CountersPlus.UI.ViewControllers.Editing;
using CountersPlus.Utils;
using HMUI;
using System;
Expand All @@ -10,13 +9,15 @@
using UnityEngine;
using VRUIControls;
using Zenject;
using BeatSaber.GameSettings;
using static CountersPlus.Utils.Accessors;

namespace CountersPlus.UI.FlowCoordinators
{
public class CountersPlusSettingsFlowCoordinator : FlowCoordinator
{
public readonly Vector3 MAIN_SCREEN_OFFSET = new Vector3(0, -4, 0);


[Inject] public List<ConfigModel> AllConfigModels;
[Inject] private CanvasUtility canvasUtility;
Expand All @@ -33,17 +34,17 @@ public class CountersPlusSettingsFlowCoordinator : FlowCoordinator
[Inject] private CountersPlusBlankViewController blank;
[Inject] private CountersPlusMainScreenNavigationController mainScreenNavigation;
[Inject] private CountersPlusSettingSectionSelectionViewController settingsSelection;
[Inject] private SettingsFlowCoordinator settingsFlowCoordinator;
[Inject] private GraphicSettingsHandler graphicSettingsHandler;
[Inject] private SongPreviewPlayer songPreviewPlayer;

private MainSettingsModelSO mainSettings;

private HashSet<string> persistentScenes = new HashSet<string>();
private bool hasTransitioned = false;

private ScreenSystem screenSystem;

protected override void DidActivate(bool firstActivation, bool addedToHierarchy, bool screenSystemEnabling)
{

if (addedToHierarchy)
{
showBackButton = true;
Expand All @@ -65,7 +66,6 @@ public void DoSceneTransition(Action callback = null)
hasTransitioned = true;

persistentScenes = GSMPersistentScenes(ref gameScenesManager); // Get our hashset of persistent scenes
mainSettings = SFCMainSettingsModel(ref settingsFlowCoordinator);

// Make sure our menu persists through the transition
persistentScenes.Add("MenuCore");
Expand Down Expand Up @@ -107,7 +107,7 @@ static void DisableAllNonImportantObjects(Transform original, Transform source,
// Gotta do some jank to re-activate the Root Container
menuEnvironmentManager.transform.root.gameObject.SetActive(true);

if (mainSettings.screenDisplacementEffectsEnabled)
if (graphicSettingsHandler.instance.customPreset.screenDisplacementEffects)
{
// Disable menu shockwave to forget about rendering order problems
menuShockwave.gameObject.SetActive(false);
Expand Down Expand Up @@ -179,7 +179,7 @@ private void TransitionToMenu()
vrInputModule.gameObject.SetActive(true);

// This took a long time to figure out.
if (mainSettings.screenDisplacementEffectsEnabled)
if (graphicSettingsHandler.instance.customPreset.screenDisplacementEffects)
{
menuShockwave.gameObject.SetActive(true);
}
Expand Down
4 changes: 2 additions & 2 deletions Counters+/Utils/Accessors.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using HMUI;
using BeatSaber.GameSettings;
using HMUI;
using IPA.Utilities;
using System.Collections.Generic;
using TMPro;
Expand All @@ -22,7 +23,6 @@ static class Accessors
#region Counters+ UI
public static FieldAccessor<GameScenesManager, HashSet<string>>.Accessor GSMPersistentScenes = FieldAccessor<GameScenesManager, HashSet<string>>.GetAccessor("_neverUnloadScenes");
public static FieldAccessor<MenuTransitionsHelper, TutorialScenesTransitionSetupDataSO>.Accessor MTHTutorialScenesSetup = FieldAccessor<MenuTransitionsHelper, TutorialScenesTransitionSetupDataSO>.GetAccessor("_tutorialScenesTransitionSetupData");
public static FieldAccessor<SettingsFlowCoordinator, MainSettingsModelSO>.Accessor SFCMainSettingsModel = FieldAccessor<SettingsFlowCoordinator, MainSettingsModelSO>.GetAccessor("_mainSettingsModel");
#endregion

public static FieldAccessor<ScoreUIController, TextMeshProUGUI>.Accessor ScoreUIText = FieldAccessor<ScoreUIController, TextMeshProUGUI>.GetAccessor("_scoreText");
Expand Down
8 changes: 4 additions & 4 deletions Counters+/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"id": "Counters+",
"name": "Counters+",
"author": "Caeden117",
"version": "2.3.6",
"version": "2.3.7",
"description": "A suite of enhancements for Beat Saber's UI.",
"icon": "CountersPlus.UI.Images.Logo.png",
"gameVersion": "1.35.0",
"gameVersion": "1.36.2",
"dependsOn": {
"BSIPA": "^4.3.3",
"BeatSaberMarkupLanguage": "^1.9.0",
"SiraUtil": "^3.1.7"
"BeatSaberMarkupLanguage": "^1.11.0",
"SiraUtil": "^3.1.8"
},
"features": {
"IPA.DefineFeature": {
Expand Down

0 comments on commit c633c1e

Please sign in to comment.