0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 02:10:45 -05:00

Adds the ability to see items required by pmc quests as a scav like live on Found in Raid Items

This commit is contained in:
Kaeno 2024-02-10 18:07:45 +00:00
parent 3853a413f6
commit 96f107f1d2
2 changed files with 30 additions and 1 deletions

View File

@ -65,7 +65,8 @@ namespace Aki.Custom
new BTREndRaidItemDeliveryPatch().Enable(); new BTREndRaidItemDeliveryPatch().Enable();
new BTRDestroyAtRaidEndPatch().Enable(); new BTRDestroyAtRaidEndPatch().Enable();
new BTRVehicleMovementSpeedPatch().Enable(); new BTRVehicleMovementSpeedPatch().Enable();
} new ScavItemCheckmarkPatch().Enable();
}
catch (Exception ex) catch (Exception ex)
{ {
Logger.LogError($"A PATCH IN {GetType().Name} FAILED. SUBSEQUENT PATCHES HAVE NOT LOADED"); Logger.LogError($"A PATCH IN {GetType().Name} FAILED. SUBSEQUENT PATCHES HAVE NOT LOADED");

View File

@ -0,0 +1,28 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Aki.Reflection.Patching;
using Aki.Reflection.Utils;
using EFT.UI.DragAndDrop;
using HarmonyLib;
namespace Aki.Custom.Patches
{
public class ScavItemCheckmarkPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(QuestItemViewPanel), nameof(QuestItemViewPanel.smethod_0));
}
[PatchPrefix]
public static void PatchPreFix(ref IEnumerable<QuestDataClass> quests)
{
var pmcQuests = PatchConstants.BackEndSession.Profile.QuestsData;
var scavQuests = PatchConstants.BackEndSession.ProfileOfPet.QuestsData;
quests = pmcQuests.Concat(scavQuests);
}
}
}