diff --git a/astealz-SmartSpawnController/BepInEx/plugins/astealz.SmartSpawn.dll b/astealz-SmartSpawnController/BepInEx/plugins/astealz.SmartSpawn.dll new file mode 100644 index 0000000..cf657da Binary files /dev/null and b/astealz-SmartSpawnController/BepInEx/plugins/astealz.SmartSpawn.dll differ diff --git a/astealz-SmartSpawnController/module.dll b/astealz-SmartSpawnController/module.dll deleted file mode 100644 index 2a07a1b..0000000 Binary files a/astealz-SmartSpawnController/module.dll and /dev/null differ diff --git a/src/References/UnityEngine.dll b/src/References/UnityEngine.dll new file mode 100644 index 0000000..6ff1d0f Binary files /dev/null and b/src/References/UnityEngine.dll differ diff --git a/src/Module.cs b/src/SmartSpawnPlugin.cs similarity index 75% rename from src/Module.cs rename to src/SmartSpawnPlugin.cs index eeae376..437b897 100644 --- a/src/Module.cs +++ b/src/SmartSpawnPlugin.cs @@ -1,17 +1,18 @@ -using astealz.SmartSpawnController.Utils; +using BepInEx; using Newtonsoft.Json; using System; namespace astealz.SmartSpawnController { - static class Module + [BepInPlugin("astealz.SmartSpawn", "astealz.SmartSpawn", "1.1.0")] + public class SmartSpawnPlugin : BaseUnityPlugin { public const string Name = "astealz-SmartSpawnController"; private static bool isApplyPatchesSuccess; - static void Main() + public void Awake() { - Logger.Info($"Loading: {Name}"); + Logger.LogInfo($"Loading: {Name}"); try { @@ -29,11 +30,11 @@ namespace astealz.SmartSpawnController } catch (Exception ex) { - Logger.Error(ex.ToString()); + Logger.LogError(ex.ToString()); } } - private static void Instance_StaticUpdate() + private void Instance_StaticUpdate() { var console = UnityEngine.GameObject.Find("Console"); if (console == null) @@ -46,9 +47,9 @@ namespace astealz.SmartSpawnController Utils.GameConsole.Initialize(cs); if (isApplyPatchesSuccess) - Logger.Info("Ready!"); + Logger.LogInfo("Ready!"); else - Logger.Info("An error occurred while loading!"); + Logger.LogInfo("An error occurred while loading!"); EFT.StaticManager.Instance.StaticUpdate -= Instance_StaticUpdate; } diff --git a/src/astealz.SmartSpawnController.csproj b/src/astealz.SmartSpawnController.csproj index 3f822d5..03e61df 100644 --- a/src/astealz.SmartSpawnController.csproj +++ b/src/astealz.SmartSpawnController.csproj @@ -47,6 +47,9 @@ ..\References\Assembly-CSharp.dll False + + packages\BepInEx.BaseLib.5.4.19\lib\net35\BepInEx.dll + False References\bsg.componentace.compression.libs.zlib.dll @@ -71,6 +74,9 @@ False + + References\UnityEngine.dll + False References\UnityEngine.CoreModule.dll @@ -84,7 +90,7 @@ - + @@ -118,6 +124,6 @@ - copy /y $(TargetPath) $(SolutionDir)\..\astealz-SmartSpawnController\module.dll + copy /y $(TargetPath) $(SolutionDir)\..\astealz-SmartSpawnController\BepInEx\plugins\astealz.SmartSpawn.dll \ No newline at end of file diff --git a/src/packages.config b/src/packages.config index 6fa11be..c059658 100644 --- a/src/packages.config +++ b/src/packages.config @@ -1,4 +1,5 @@  + \ No newline at end of file