0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 06:30:43 -05:00
modules/project/Aki.PrePatch/AkiBotsPrePatcher.cs
Kaeno 7bf0dc8a47 Update to new game version 22561 (!8)
Co-authored-by: Kaeno
Reviewed-on: SPT-AKI/Modules#8
Co-authored-by: Kaeno <kaeno@noreply.dev.sp-tarkov.com>
Co-committed-by: Kaeno <kaeno@noreply.dev.sp-tarkov.com>
2023-04-05 17:42:39 +00:00

31 lines
1.1 KiB
C#

using System.Collections.Generic;
using Mono.Cecil;
namespace Aki.PrePatch
{
public static class AkiBotsPrePatcher
{
public static IEnumerable<string> TargetDLLs { get; } = new[] { "Assembly-CSharp.dll" };
public static int sptUsecValue = 32;
public static int sptBearValue = 33;
public static void Patch(ref AssemblyDefinition assembly)
{
var botEnums = assembly.MainModule.GetType("EFT.WildSpawnType");
var sptUsec = new FieldDefinition("sptUsec",
FieldAttributes.Public | FieldAttributes.Static | FieldAttributes.Literal | FieldAttributes.HasDefault,
botEnums)
{ Constant = sptUsecValue };
var sptBear = new FieldDefinition("sptBear",
FieldAttributes.Public | FieldAttributes.Static | FieldAttributes.Literal | FieldAttributes.HasDefault,
botEnums)
{ Constant = sptBearValue };
botEnums.Fields.Add(sptUsec);
botEnums.Fields.Add(sptBear);
}
}
}