2024-05-21 19:10:17 +01:00
|
|
|
|
using SPT.Reflection.Patching;
|
|
|
|
|
using SPT.SinglePlayer.Utils.TraderServices;
|
2024-02-12 09:22:45 +00:00
|
|
|
|
using Comfort.Common;
|
|
|
|
|
using EFT;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
|
2024-05-21 19:10:17 +01:00
|
|
|
|
namespace SPT.SinglePlayer.Patches.TraderServices
|
2024-02-12 09:22:45 +00:00
|
|
|
|
{
|
|
|
|
|
public class LightKeeperServicesPatch : ModulePatch
|
|
|
|
|
{
|
|
|
|
|
protected override MethodBase GetTargetMethod()
|
|
|
|
|
{
|
|
|
|
|
return typeof(GameWorld).GetMethod(nameof(GameWorld.OnGameStarted));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[PatchPostfix]
|
|
|
|
|
public static void PatchPostFix()
|
|
|
|
|
{
|
|
|
|
|
var gameWorld = Singleton<GameWorld>.Instance;
|
|
|
|
|
|
|
|
|
|
if (gameWorld != null)
|
|
|
|
|
{
|
|
|
|
|
gameWorld.gameObject.AddComponent<LightKeeperServicesManager>();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|