Update for bepinex
This commit is contained in:
parent
040ee3f9e2
commit
41cb23d0a0
@ -1,16 +1,18 @@
|
||||
using EFT;
|
||||
using BepInEx;
|
||||
using EFT;
|
||||
using EFT.UI;
|
||||
using System.Text.RegularExpressions;
|
||||
using UnityEngine;
|
||||
|
||||
namespace astealz.BotMonitor
|
||||
{
|
||||
class Module
|
||||
[BepInPlugin("astealz.BotMonitor", "astealz.BotMonitor", "1.1.0")]
|
||||
public class BotMonitorPlugin : BaseUnityPlugin
|
||||
{
|
||||
internal const string Name = "BotMonitor";
|
||||
private static float timer = 0f;
|
||||
|
||||
static void Main()
|
||||
public void Awake()
|
||||
{
|
||||
StaticManager.Instance.StaticUpdate += Instance_StaticUpdate;
|
||||
}
|
||||
@ -56,7 +58,7 @@ namespace astealz.BotMonitor
|
||||
return;
|
||||
}
|
||||
|
||||
var botCounter = Extensions.GetOrAddComponent<BotMonitor>(Globals.GameWorldObject);
|
||||
var botCounter = Extensions.GetOrAddComponent<BotMonitor>(Globals.GameWorldObject);
|
||||
botCounter.SetMode(value);
|
||||
botCounter.enabled = value != 0;
|
||||
}
|
@ -181,6 +181,8 @@ namespace astealz.BotMonitor
|
||||
return "followerTagilla";
|
||||
case WildSpawnType.followerTest:
|
||||
return "followerTest";
|
||||
case WildSpawnType.exUsec:
|
||||
return "exUsec";
|
||||
}
|
||||
return wildSpawnType.ToString();
|
||||
}
|
||||
|
@ -45,11 +45,11 @@ namespace astealz.BotMonitor
|
||||
{
|
||||
_console = consoleScreen;
|
||||
|
||||
AddLog($"{Module.Name}: Console initialized", Color.green);
|
||||
AddLog($"{BotMonitorPlugin.Name}: Console initialized", Color.green);
|
||||
|
||||
AddCommand($"{Module.Name.ToLower()}-help", ShowHelp);
|
||||
AddCommand($"{BotMonitorPlugin.Name.ToLower()}-help", ShowHelp);
|
||||
|
||||
AddLog($"type '{Module.Name.ToLower()}-help' to see available commands", Color.green);
|
||||
AddLog($"type '{BotMonitorPlugin.Name.ToLower()}-help' to see available commands", Color.green);
|
||||
}
|
||||
|
||||
private static void ShowHelp(Match obj)
|
||||
|
@ -6,13 +6,13 @@ namespace astealz.BotMonitor
|
||||
{
|
||||
public static void Info(string msg)
|
||||
{
|
||||
var s = $"{Module.Name}: {msg}";
|
||||
var s = $"{BotMonitorPlugin.Name}: {msg}";
|
||||
GameConsole.AddLog(s);
|
||||
}
|
||||
|
||||
public static void Error(string msg)
|
||||
{
|
||||
var s = $"{Module.Name}: {msg}";
|
||||
var s = $"{BotMonitorPlugin.Name}: {msg}";
|
||||
GameConsole.AddLog(s, Color.red);
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
BIN
src/References/UnityEngine.dll
Normal file
BIN
src/References/UnityEngine.dll
Normal file
Binary file not shown.
@ -47,6 +47,9 @@
|
||||
<HintPath>References\Assembly-CSharp.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="BepInEx, Version=5.4.17.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>packages\BepInEx.BaseLib.5.4.17\lib\net35\BepInEx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Comfort">
|
||||
<HintPath>References\Comfort.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
@ -55,6 +58,9 @@
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>References\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>References\UnityEngine.CoreModule.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
@ -75,10 +81,10 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BotMonitor.cs" />
|
||||
<Compile Include="BotMonitorPlugin.cs" />
|
||||
<Compile Include="Extensions.cs" />
|
||||
<Compile Include="GenericPatch`.cs" />
|
||||
<Compile Include="Logger.cs" />
|
||||
<Compile Include="Module.cs" />
|
||||
<Compile Include="GameConsole.cs" />
|
||||
<Compile Include="Globals.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="BepInEx.BaseLib" version="5.4.17" targetFramework="net472" />
|
||||
<package id="Lib.Harmony" version="2.1.1" targetFramework="net472" />
|
||||
</packages>
|
Loading…
x
Reference in New Issue
Block a user