0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00
2023-03-03 18:52:31 +00:00

26 lines
729 B
C#

using Aki.Reflection.Patching;
using Aki.SinglePlayer.Models.Progression;
using Comfort.Common;
using EFT;
using System.Reflection;
namespace Aki.SinglePlayer.Patches.Progression
{
public class LighthouseBridgePatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return typeof(GameWorld).GetMethod(nameof(GameWorld.OnGameStarted));
}
[PatchPostfix]
private static void PatchPostfix()
{
var gameWorld = Singleton<GameWorld>.Instance;
if (gameWorld == null || gameWorld.MainPlayer.Location.ToLower() != "lighthouse") return;
gameWorld.GetOrAddComponent<LighthouseProgressionClass>();
}
}
}