Update for 2.3.0

This commit is contained in:
Chomp 2022-03-21 11:30:12 +00:00
parent 76aafe3b9a
commit 45a2ea1d56
6 changed files with 18 additions and 10 deletions

Binary file not shown.

View File

@ -1,17 +1,18 @@
using astealz.SmartSpawnController.Utils; using BepInEx;
using Newtonsoft.Json; using Newtonsoft.Json;
using System; using System;
namespace astealz.SmartSpawnController namespace astealz.SmartSpawnController
{ {
static class Module [BepInPlugin("astealz.SmartSpawn", "astealz.SmartSpawn", "1.1.0")]
public class SmartSpawnPlugin : BaseUnityPlugin
{ {
public const string Name = "astealz-SmartSpawnController"; public const string Name = "astealz-SmartSpawnController";
private static bool isApplyPatchesSuccess; private static bool isApplyPatchesSuccess;
static void Main() public void Awake()
{ {
Logger.Info($"Loading: {Name}"); Logger.LogInfo($"Loading: {Name}");
try try
{ {
@ -29,11 +30,11 @@ namespace astealz.SmartSpawnController
} }
catch (Exception ex) 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"); var console = UnityEngine.GameObject.Find("Console");
if (console == null) if (console == null)
@ -46,9 +47,9 @@ namespace astealz.SmartSpawnController
Utils.GameConsole.Initialize(cs); Utils.GameConsole.Initialize(cs);
if (isApplyPatchesSuccess) if (isApplyPatchesSuccess)
Logger.Info("Ready!"); Logger.LogInfo("Ready!");
else else
Logger.Info("An error occurred while loading!"); Logger.LogInfo("An error occurred while loading!");
EFT.StaticManager.Instance.StaticUpdate -= Instance_StaticUpdate; EFT.StaticManager.Instance.StaticUpdate -= Instance_StaticUpdate;
} }

View File

@ -47,6 +47,9 @@
<HintPath>..\References\Assembly-CSharp.dll</HintPath> <HintPath>..\References\Assembly-CSharp.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="BepInEx, Version=5.4.19.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\BepInEx.BaseLib.5.4.19\lib\net35\BepInEx.dll</HintPath>
</Reference>
<Reference Include="bsg.componentace.compression.libs.zlib, Version=1.0.3.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="bsg.componentace.compression.libs.zlib, Version=1.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>References\bsg.componentace.compression.libs.zlib.dll</HintPath> <HintPath>References\bsg.componentace.compression.libs.zlib.dll</HintPath>
@ -71,6 +74,9 @@
<Reference Include="Microsoft.CSharp"> <Reference Include="Microsoft.CSharp">
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="UnityEngine">
<HintPath>References\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>References\UnityEngine.CoreModule.dll</HintPath> <HintPath>References\UnityEngine.CoreModule.dll</HintPath>
@ -84,7 +90,7 @@
<Compile Include="Behaviors\BotUnspawnController.cs" /> <Compile Include="Behaviors\BotUnspawnController.cs" />
<Compile Include="Config.cs" /> <Compile Include="Config.cs" />
<Compile Include="Extensions.cs" /> <Compile Include="Extensions.cs" />
<Compile Include="Module.cs" /> <Compile Include="SmartSpawnPlugin.cs" />
<Compile Include="Globals.cs" /> <Compile Include="Globals.cs" />
<Compile Include="Patches\BotSpawnerPatch.Extensions.cs" /> <Compile Include="Patches\BotSpawnerPatch.Extensions.cs" />
<Compile Include="Patches\BotSpawnerPatches.BotSpawnerDelayPatch.cs" /> <Compile Include="Patches\BotSpawnerPatches.BotSpawnerDelayPatch.cs" />
@ -118,6 +124,6 @@
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>copy /y $(TargetPath) $(SolutionDir)\..\astealz-SmartSpawnController\module.dll</PostBuildEvent> <PostBuildEvent>copy /y $(TargetPath) $(SolutionDir)\..\astealz-SmartSpawnController\BepInEx\plugins\astealz.SmartSpawn.dll</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="BepInEx.BaseLib" version="5.4.19" targetFramework="net472" />
<package id="Lib.Harmony" version="2.1.1" targetFramework="net472" /> <package id="Lib.Harmony" version="2.1.1" targetFramework="net472" />
</packages> </packages>