Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlackParrot committed Jan 3, 2025
1 parent 72b73a8 commit d1c2129
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 17 deletions.
1 change: 0 additions & 1 deletion NoteTweaks/Patches/NoteArrowPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Linq;
using System.Reflection;
using HarmonyLib;
using Newtonsoft.Json;
using NoteTweaks.Utils;
using SongCore.Data;
using UnityEngine;
Expand Down
1 change: 0 additions & 1 deletion NoteTweaks/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using IPA;
using IPA.Config;
using IPA.Config.Stores;
using Newtonsoft.Json;
using NoteTweaks.Configuration;
using NoteTweaks.Installers;
using NoteTweaks.Utils;
Expand Down
3 changes: 0 additions & 3 deletions NoteTweaks/UI/ExtraPanelViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using BeatSaberMarkupLanguage.Attributes;
using BeatSaberMarkupLanguage.ViewControllers;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NoteTweaks.Configuration;
using UnityEngine;
using Zenject;
Expand Down Expand Up @@ -43,8 +42,6 @@ public ExtraPanelViewController()
{
byte[] manifestData = SiraUtil.Extras.Utilities.GetResource(Assembly.GetExecutingAssembly(), "NoteTweaks.manifest.json");
Manifest = JsonConvert.DeserializeObject<ManifestData>(System.Text.Encoding.UTF8.GetString(manifestData));

Plugin.Log.Info(System.Text.Encoding.UTF8.GetString(manifestData));

gameVersion = $"<alpha=#CC>(<alpha=#77><size=80%>for</size> <b><alpha=#FF>{Manifest.GameVersion}<alpha=#CC></b>)";
author = $"<alpha=#77><size=80%>developed by</size> <b><alpha=#FF>{Manifest.Author}</b>";
Expand Down
13 changes: 3 additions & 10 deletions NoteTweaks/UI/PreviewViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ internal class NotePreviewViewController : BSMLAutomaticViewController
private static Mesh _dotMesh;
private static Mesh _dotGlowMesh;
private static readonly Texture2D OriginalArrowGlowTexture = Resources.FindObjectsOfTypeAll<Texture2D>().ToList().First(x => x.name == "ArrowGlow");
private static readonly Texture2D ReplacementArrowGlowTexture = Utils.Textures.PrepareTexture(OriginalArrowGlowTexture);
private static readonly Texture2D ReplacementArrowGlowTexture = OriginalArrowGlowTexture.PrepareTexture();
private static readonly Texture2D OriginalDotGlowTexture = Resources.FindObjectsOfTypeAll<Texture2D>().ToList().First(x => x.name == "NoteCircleBakedGlow");
private static readonly Texture2D ReplacementDotGlowTexture = Utils.Textures.PrepareTexture(OriginalDotGlowTexture);
private static readonly Texture2D ReplacementDotGlowTexture = OriginalDotGlowTexture.PrepareTexture();

private static readonly int Color0 = Shader.PropertyToID("_Color");

Expand Down Expand Up @@ -224,14 +224,7 @@ public static void UpdateNoteScale()
for (int i = 0; i < NoteContainer.transform.childCount; i++)
{
GameObject noteCube = NoteContainer.transform.GetChild(i).gameObject;
if (noteCube.name.Contains("_Chain_"))
{
noteCube.transform.localScale = Vectors.Max(Plugin.Config.NoteScale * Plugin.Config.LinkScale, 0.1f);
}
else
{
noteCube.transform.localScale = Plugin.Config.NoteScale;
}
noteCube.transform.localScale = noteCube.name.Contains("_Chain_") ? Vectors.Max(Plugin.Config.NoteScale * Plugin.Config.LinkScale, 0.1f) : Plugin.Config.NoteScale;
}
}

Expand Down
3 changes: 1 addition & 2 deletions NoteTweaks/UI/SettingsViewController.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using BeatSaberMarkupLanguage.Attributes;
using BeatSaberMarkupLanguage.Attributes;
using BeatSaberMarkupLanguage.ViewControllers;
using NoteTweaks.Configuration;
using UnityEngine;
Expand Down

0 comments on commit d1c2129

Please sign in to comment.