Decompiled source of English Music Room v1.0.2

MusicRoomEN.dll

Decompiled a year ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Threading.Tasks;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using LBoL.ConfigData;
using LBoL.Presentation;
using LBoL.Presentation.UI.Panels;
using TMPro;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("LBoL.Base")]
[assembly: IgnoresAccessChecksTo("LBoL.ConfigData")]
[assembly: IgnoresAccessChecksTo("LBoL.Core")]
[assembly: IgnoresAccessChecksTo("LBoL.EntityLib")]
[assembly: IgnoresAccessChecksTo("LBoL.Presentation")]
[assembly: IgnoresAccessChecksTo("Untitled.ConfigDataBuilder.Base")]
[assembly: AssemblyCompany("MusicRoomCommentEN")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("MusicRoomCommentEN")]
[assembly: AssemblyTitle("MusicRoomCommentEN")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace MusicRoomCommentEN
{
	public static class CommentTranslations
	{
		public const string Stage1Comment = "Theme of the Bamboo Forest of the Lost, the first stage theme.\nThis song is filled with excitement for battle, enough to quickly get the player ready to face the battles ahead.\nTimbre similar to birds chirping are also used, adding to song's description of the night-time atmosphere.";

		public const string Stage2Comment = "Theme of the Genbu Ravine, the second stage theme.\nThis song heavily gives off the feeling of a mysterious and unknown adventure, using many national percussion instruments by design, letting the player feel that they are in an unknown place.";

		public const string Stage3Comment = "Theme of the Wind God's Lake, the third stage theme.\nA song which feels like cruising along the winds. Does it feel like the danmaku is right in front of you? Dance ";

		public const string GapComment = "An European-style song.\nA combined performance of the elegant harpsichord and the quiet glockenspiel makes one feel very relaxed and especially want to take a break.";

		public const string ShopComment = "A song which reflects the mood of the holidays.\nGuys, let's stop fighting each other and laze around together!";

		public const string Elite1Comment = "Theme that plays for elite enemies.\nThe intense rhythm reminds the player they're in for a major battle.\nAre they confident in their victory?";

		public const string Elite2Comment = "Theme that plays for elite enemies.\nThe intense rhythm reflects the thrill and anxiety of the fight.\nIf the player doesn't give it their all, defeat will come very easily!";

		public const string SeijaComment = "Seija Kijin's boss theme.\nStep into the final battle, a world where everything is upside-down. Pull out all the stops; seize the one chance to overthrow those above and put everything right.";
	}
	[BepInPlugin("reale.lbol.musicroomen", "Music Room EN", "1.0.0")]
	[BepInProcess("LBoL.exe")]
	public class Plugin : BaseUnityPlugin
	{
		[HarmonyPatch(typeof(GameEntry), "InitializeRestAsync")]
		[HarmonyPriority(200)]
		private class BGMConfig_Patch
		{
			private static void translateSong(BgmConfig song, string trackName, string name, string original, string comment = "")
			{
				song.TrackName = trackName;
				song.Name = name;
				song.Original = original;
				if (comment != "")
				{
					song.Comment = comment;
				}
			}

			public static async void Postfix(Task __result)
			{
				await __result;
				translateSong(BgmConfig.FromID("MainMenu"), "Gensokyo's Nineteenth State", "Main Menu", " Gensokyo Millenium ~ History of the Moon");
				translateSong(BgmConfig.FromID("Stage1"), "Night Chasers", "Bamboo Forest", " Retribution for the Eternal Night ~ Imperishable Night");
				translateSong(BgmConfig.FromID("Stage2"), "Discovery & Discoverer", "Genbu Ravine", " Fall of Fall ~ Autumnal Waterfall");
				translateSong(BgmConfig.FromID("Stage3"), "Hermit Sought on Wind", "Wind God's Lake", " The Primal Scene of Japan the Girl Saw");
				translateSong(BgmConfig.FromID("Gap"), "Nightfall Melody", "The Gap", " Necrofantasia", "An European-style song.\nA combined performance of the elegant harpsichord and the quiet glockenspiel makes one feel very relaxed and especially want to take a break.");
				translateSong(BgmConfig.FromID("Shop"), "Respite in the Forest", "The Shop", " Banditry Technology", "A song which reflects the mood of the holidays.\nGuys, let's stop fighting each other and laze around together!");
				translateSong(BgmConfig.FromID("Adventure1"), "Set Out", "Event 1", " Gensokyo Millenium ~ History of the Moon");
				translateSong(BgmConfig.FromID("Adventure2"), "Games in the Forest", "Event 2", " The Gensokyo the Gods Loved");
				translateSong(BgmConfig.FromID("Adventure3"), "Left Behind", "Event 3", " Girls' Secret Sealing Club");
				translateSong(BgmConfig.FromID("Elite1"), "Do Not Underestimate", "Elite 1", " Eternal Transient Reign", "Theme that plays for elite enemies.\nThe intense rhythm reminds the player they're in for a major battle.\nAre they confident in their victory?");
				translateSong(BgmConfig.FromID("Elite2"), "Stand-off", "Elite 2", " Bell of Avici ~ Infinite Nightmare", "Theme that plays for elite enemies.\nThe intense rhythm reflects the thrill and anxiety of the fight.\nIf the player doesn't give it their all, defeat will come very easily!");
				translateSong(BgmConfig.FromID("Reimu"), "Form of Spirit Seal", "Reimu Hakurei", " Maiden's Capriccio ~ Dream Battle");
				translateSong(BgmConfig.FromID("Marisa"), "Form of Magic Missile", "Marisa Kirisame", " Love-colored Master Spark");
				translateSong(BgmConfig.FromID("Sakuya"), "Form of Stopped Time", "Sakuya Izayoi", " Flowering Night");
				translateSong(BgmConfig.FromID("Long"), "Form of Falling Star", "Megumu Iizunamaru", " Starry Mountain of Tenma");
				translateSong(BgmConfig.FromID("Tianzi"), "Form of Shining Sword", "Tenshi Hinanawi", " Catastrophe in Bhavaagra ~ Wonderful Heaven");
				translateSong(BgmConfig.FromID("Yuyuko"), "Form of Butterfly Dance", "Yuyuko Saigyouji", " Bloom Nobly, Ink-Black Cherry Blossom ~ Border of Life");
				translateSong(BgmConfig.FromID("Remilia"), "Form of Scarlet Red", "Remilia Scarlet", " Septette for the Dead Princess");
				translateSong(BgmConfig.FromID("Sanae"), "Form of Wind Priestess", "Sanae Kochiya", " Faith is for the Transient People");
				translateSong(BgmConfig.FromID("Junko"), "Form of Murderous Intent", "Junko", " Pure Furies ~ Whereabouts of the Heart");
				translateSong(BgmConfig.FromID("Cirno"), "Form of Freezing Ice", "Cirno", " Beloved Tomboyish Girl");
				translateSong(BgmConfig.FromID("Seija"), "Social Upheaval and Final Standstill", "Seija", " Romantic Escape Flight", "Seija Kijin's boss theme.\nStep into the final battle, a world where everything is upside-down. Pull out all the stops; seize the one chance to overthrow those above and put everything right.");
				log.LogInfo((object)"Music Room EN Loaded!");
			}
		}

		[HarmonyPatch(typeof(MusicRoomPanel), "Awake")]
		private class TextboxResize
		{
			public static void Postfix(MusicRoomPanel __instance)
			{
				((TMP_Text)GameObject.Find("Origin").GetComponent<TextMeshProUGUI>()).fontSize = 45f;
				((TMP_Text)GameObject.Find("Uses").GetComponent<TextMeshProUGUI>()).fontSize = 45f;
				((TMP_Text)GameObject.Find("Artist").GetComponent<TextMeshProUGUI>()).fontSize = 45f;
				((TMP_Text)GameObject.Find("Comment").GetComponent<TextMeshProUGUI>()).fontSizeMax = 52f;
			}
		}

		private static readonly Harmony harmony = new Harmony("reale.lbol.musicroomen");

		internal static ManualLogSource log;

		private void Awake()
		{
			log = ((BaseUnityPlugin)this).Logger;
			Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject);
			((Object)((Component)this).gameObject).hideFlags = (HideFlags)61;
			harmony.PatchAll();
		}

		private void OnDestroy()
		{
			if (harmony != null)
			{
				harmony.UnpatchSelf();
			}
		}
	}
	public static class PluginInfo
	{
		public const string GUID = "reale.lbol.musicroomen";

		public const string Name = "Music Room EN";

		public const string version = "1.0.0";

		public static readonly Harmony harmony = new Harmony("reale.lbol.musicroomen");
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		internal IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}