Decompiled source of GDG ScheduleI Traditional Chinese Translation v1.0.4

AutoTranslatorMover.dll

Decompiled 3 weeks ago
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using AutoTranslatorMover;
using MelonLoader;
using Microsoft.CodeAnalysis;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: MelonInfo(typeof(Main), "XUnity.AutoTranslator MelonMod-IL2CPP擦屁股dll", "1.0.0", "GDG遊戲聯合公國-午夜的大叔", null)]
[assembly: MelonGame(null, null)]
[assembly: MelonOptionalDependencies(new string[] { "XUnity.AutoTranslator.Plugin.MelonMod" })]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("AutoTranslatorMover")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("AutoTranslatorMover")]
[assembly: AssemblyTitle("AutoTranslatorMover")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace AutoTranslatorMover
{
	public class Main : MelonMod
	{
		public override void OnInitializeMelon()
		{
			MelonLogger.Msg("開始進行該死的擦屁股作業...");
			string? directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
			_ = Directory.GetParent(Directory.GetParent(directoryName).FullName).FullName;
			string text = Path.Combine(Directory.GetCurrentDirectory(), "AutoTranslator");
			string text2 = null;
			string text3 = Path.Combine(directoryName, "AutoTranslator");
			if (Directory.Exists(text3))
			{
				text2 = text3;
			}
			if (text2 == null)
			{
				return;
			}
			try
			{
				if (Directory.Exists(text))
				{
					Directory.Delete(text, recursive: true);
				}
				DirectoryCopy(text2, text, copySubDirs: true);
			}
			catch (Exception ex)
			{
				MelonLogger.Error("❌ 搬移失敗: " + ex.Message);
			}
		}

		private void DirectoryCopy(string sourceDirName, string destDirName, bool copySubDirs)
		{
			DirectoryInfo directoryInfo = new DirectoryInfo(sourceDirName);
			DirectoryInfo[] directories = directoryInfo.GetDirectories();
			Directory.CreateDirectory(destDirName);
			FileInfo[] files = directoryInfo.GetFiles();
			foreach (FileInfo fileInfo in files)
			{
				string destFileName = Path.Combine(destDirName, fileInfo.Name);
				fileInfo.CopyTo(destFileName, overwrite: true);
			}
			if (copySubDirs)
			{
				DirectoryInfo[] array = directories;
				foreach (DirectoryInfo directoryInfo2 in array)
				{
					string destDirName2 = Path.Combine(destDirName, directoryInfo2.Name);
					DirectoryCopy(directoryInfo2.FullName, destDirName2, copySubDirs);
				}
			}
		}
	}
}

Sharedassets0Replacer.dll

Decompiled 3 weeks ago
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using MelonLoader;
using Microsoft.CodeAnalysis;
using Sharedassets0Replacer;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: MelonInfo(typeof(Main), "Sharedassets0Replacer補字型", "1.0.0", "原作:狐空XoFKon | dll製作:GDG遊戲聯合公國-午夜的大叔", null)]
[assembly: MelonGame(null, null)]
[assembly: MelonOptionalDependencies(new string[] { "XUnity.AutoTranslator.Plugin.MelonMod" })]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("Sharedassets0Replacer")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Sharedassets0Replacer")]
[assembly: AssemblyTitle("Sharedassets0Replacer")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace Sharedassets0Replacer
{
	public class Main : MelonMod
	{
		public override void OnInitializeMelon()
		{
			MelonLogger.Msg("開始置換Sharedassets0Replacer補字型作業...");
			string? directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
			string destDirName = Path.Combine(Directory.GetCurrentDirectory(), "Schedule I_Data");
			string text = null;
			string text2 = Path.Combine(directoryName, "Schedule I_Data");
			if (Directory.Exists(text2))
			{
				text = text2;
			}
			else if (!Directory.Exists(text2))
			{
				MelonLogger.Msg("✅ 已覆蓋過 「sharedassets0.assets」");
			}
			if (text == null)
			{
				return;
			}
			try
			{
				DirectoryCopy(text, destDirName, copySubDirs: true);
				MelonLogger.Msg("✅ 已覆蓋 「sharedassets0.assets」");
				Directory.Delete(text2, recursive: true);
				MelonLogger.Msg("✅ 已刪除模組的 「sharedassets0.assets」省空間");
			}
			catch (Exception ex)
			{
				MelonLogger.Error("❌ 搬移失敗: " + ex.Message);
			}
		}

		private void DirectoryCopy(string sourceDirName, string destDirName, bool copySubDirs)
		{
			DirectoryInfo directoryInfo = new DirectoryInfo(sourceDirName);
			DirectoryInfo[] directories = directoryInfo.GetDirectories();
			Directory.CreateDirectory(destDirName);
			FileInfo[] files = directoryInfo.GetFiles();
			foreach (FileInfo fileInfo in files)
			{
				string destFileName = Path.Combine(destDirName, fileInfo.Name);
				fileInfo.CopyTo(destFileName, overwrite: true);
			}
			if (copySubDirs)
			{
				DirectoryInfo[] array = directories;
				foreach (DirectoryInfo directoryInfo2 in array)
				{
					string destDirName2 = Path.Combine(destDirName, directoryInfo2.Name);
					DirectoryCopy(directoryInfo2.FullName, destDirName2, copySubDirs);
				}
			}
		}
	}
}