diff --git a/PizzaOven/ModLoader.cs b/PizzaOven/ModLoader.cs index 82ca2ae..a64d44e 100644 --- a/PizzaOven/ModLoader.cs +++ b/PizzaOven/ModLoader.cs @@ -22,6 +22,12 @@ public static bool Restart() if (!banks.Contains(Path.GetFileName(file).ToLowerInvariant())) File.Delete(file); // Delete empty folders + // Delete all dlls that aren't vanilla + var dlls = new List(new string[] { "fmod.dll", "fmod-gamemaker.dll", "fmodstudio.dll", "gameframe_x64.dll", "steam_api.dll", + "steam_api64.dll", "steamworks_x64.dll"}); + foreach (var file in Directory.GetFiles($"{Global.config.ModsFolder}", "*", SearchOption.TopDirectoryOnly)) + if (!dlls.Contains(Path.GetFileName(file).ToLowerInvariant())) + File.Delete(file); foreach (var directory in Directory.GetDirectories($"{Global.config.ModsFolder}{Global.s}sound{Global.s}Desktop")) if (Directory.GetFiles(directory).Length == 0 && Directory.GetDirectories(directory).Length == 0) Directory.Delete(directory, false);