Decompiled source of Hide And Seek SoundsFR v1.0.6

Taunt_FR.dll

Decompiled 2 weeks 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.6.0")]
[assembly: AssemblyInformationalVersion("1.0.6")]
[assembly: AssemblyProduct("Taunt Hide and Seek FR")]
[assembly: AssemblyTitle("Taunt_FR")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.6.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.Taunt_FR", "Taunt_FR", "1.0.6")]
public class FolderMoverMod : BaseUnityPlugin
{
	private void Awake()
	{
		CopyFolder();
	}

	public void CopyFolder()
	{
		string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
		string text = Directory.GetParent(directoryName)?.FullName;
		if (text == null)
		{
			((BaseUnityPlugin)this).Logger.LogError((object)"Impossible de trouver le dossier plugins.");
			return;
		}
		string text2 = Path.Combine(text, "SpLinTeRTV-Hide_And_Seek_SoundsFR", "Sounds");
		string text3 = Path.Combine(text, "Gogozooom-Hide_And_Seek", "Sounds");
		if (!Directory.Exists(text2))
		{
			((BaseUnityPlugin)this).Logger.LogError((object)("Le dossier Sounds n'existe pas dans SpLinTeRTV-Hide_And_Seek_SoundsFR : " + text2));
			return;
		}
		try
		{
			if (Directory.Exists(text3))
			{
				Directory.Delete(text3, recursive: true);
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Le dossier Sounds a été supprimé dans Gogozooom-Hide_And_Seek : " + text3));
			}
			CopyDirectory(text2, text3);
			((BaseUnityPlugin)this).Logger.LogInfo((object)("Le dossier " + text2 + " a été copié vers " + text3 + "."));
		}
		catch (Exception ex)
		{
			((BaseUnityPlugin)this).Logger.LogError((object)("Erreur lors de la copie du dossier : " + ex.Message));
		}
	}

	public static void CopyDirectory(string sourceDir, string destDir)
	{
		Directory.CreateDirectory(destDir);
		string[] files = Directory.GetFiles(sourceDir);
		foreach (string text in files)
		{
			string destFileName = Path.Combine(destDir, Path.GetFileName(text));
			File.Copy(text, destFileName, overwrite: true);
		}
		string[] directories = Directory.GetDirectories(sourceDir);
		foreach (string text2 in directories)
		{
			string destDir2 = Path.Combine(destDir, Path.GetFileName(text2));
			CopyDirectory(text2, destDir2);
		}
	}
}
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.6";
	}
}