Decompiled source of Hide And Seek SoundsFR 2 v1.0.2

Taunt_FR.dll

Decompiled 9 hours ago
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using Microsoft.CodeAnalysis;

[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: AssemblyCompany("Taunt_FR")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.2.0")]
[assembly: AssemblyInformationalVersion("1.0.2")]
[assembly: AssemblyProduct("Taunt Hide and Seek FR")]
[assembly: AssemblyTitle("Taunt_FR")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.2.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
[BepInPlugin("com.SpLinTeR.TauntFR", "TauntFR", "1.0.2")]
public class FolderMoverMod : BaseUnityPlugin
{
	private void Awake()
	{
		MergeFolderToParent("Gogozooom-Hide_And_Seek");
	}

	public void MergeFolderToParent(string folderName)
	{
		string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
		string text = Path.Combine(directoryName, folderName);
		string text2 = Directory.GetParent(directoryName)?.FullName;
		if (text2 == null)
		{
			((BaseUnityPlugin)this).Logger.LogError((object)"Impossible de trouver le dossier parent.");
			return;
		}
		string text3 = Path.Combine(text2, folderName);
		try
		{
			MergeDirectories(text, text3);
			((BaseUnityPlugin)this).Logger.LogInfo((object)("Dossier fusionné de " + text + " vers " + text3));
		}
		catch (Exception ex)
		{
			((BaseUnityPlugin)this).Logger.LogError((object)("Erreur lors de la fusion des dossiers : " + ex.Message));
		}
	}

	private void MergeDirectories(string sourceDir, string targetDir)
	{
		Directory.CreateDirectory(targetDir);
		string[] files = Directory.GetFiles(sourceDir);
		foreach (string text in files)
		{
			string fileName = Path.GetFileName(text);
			string text2 = Path.Combine(targetDir, fileName);
			if (!File.Exists(text2) || File.GetLastWriteTime(text) > File.GetLastWriteTime(text2))
			{
				File.Copy(text, text2, overwrite: true);
			}
		}
		string[] directories = Directory.GetDirectories(sourceDir);
		foreach (string text3 in directories)
		{
			string fileName2 = Path.GetFileName(text3);
			string targetDir2 = Path.Combine(targetDir, fileName2);
			MergeDirectories(text3, targetDir2);
		}
	}
}
namespace Taunt_FR
{
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "Taunt_FR";

		public const string PLUGIN_NAME = "Taunt Hide and Seek FR";

		public const string PLUGIN_VERSION = "1.0.2";
	}
}