mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 09:10:44 -05:00
31 lines
1.1 KiB
C#
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 = 47;
|
|
public static int sptBearValue = 48;
|
|
|
|
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);
|
|
}
|
|
}
|
|
} |