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

Patch updates

This commit is contained in:
Kaeno 2024-08-20 19:00:11 +01:00
parent 044952e19f
commit 853a74a449
5 changed files with 14 additions and 9 deletions

View File

@ -43,6 +43,7 @@ namespace SPT.Custom.CustomAI
public void ConfigurePMCFindInRaidStatus(BotOwner ___botOwner_0)
{
// Must run before the container loot code, otherwise backpack loot is not FiR
MakeEquipmentNotFiR(___botOwner_0);
@ -73,15 +74,18 @@ namespace SPT.Custom.CustomAI
continue;
}
// Don't add FiR to tacvest items PMC usually brings into raid (meds/mags etc)
if (container.Name == "TacticalVest" && nonFiRItems.Any(item.Template._parent.Contains))
string parentId = item.Template.Parent._id;
// item.Template._parent.Contains is what it use to be.
// Don't add FiR to tacvest items PMC usually brings into raid (meds/mags etc)
if (container.Name == "TacticalVest" && nonFiRItems.Any(parentId.Contains))
{
//this.logger.LogError($"Skipping item {item.Id} {item.Name} as its on the item type blacklist");
continue;
}
// Don't add FiR to weapons in backpack (server sometimes adds pre-made weapons to backpack to simulate PMCs looting bodies)
if (container.Name == "Backpack" && weaponTypeIds.Any(item.Template._parent.Contains))
if (container.Name == "Backpack" && weaponTypeIds.Any(parentId.Contains))
{
// Add weapon root to list for later use
nonFiRRootItems.Add(item);
@ -90,7 +94,7 @@ namespace SPT.Custom.CustomAI
}
// Don't add FiR to grenades/mags/ammo/meds in pockets
if (container.Name == "Pockets" && nonFiRPocketLoot.Exists(item.Template._parent.Contains))
if (container.Name == "Pockets" && nonFiRPocketLoot.Exists(parentId.Contains))
{
//this.logger.LogError($"Skipping item {item.Id} {item.Name} as its on the item type blacklist");
continue;

View File

@ -109,7 +109,7 @@ namespace SPT.Custom.Patches
return false;
}
return requester.IsAI && requesterMind.DEFAULT_USEC_BEHAVIOUR == EWarnBehaviour.Attack && requester.Side == EPlayerSide.Usec;
return requester.IsAI && requesterMind.DEFAULT_USEC_BEHAVIOUR == EWarnBehaviour.AlwaysEnemies && requester.Side == EPlayerSide.Usec;
}
/// <summary>
@ -126,7 +126,7 @@ namespace SPT.Custom.Patches
return false;
}
return requester.IsAI && requesterMind.DEFAULT_BEAR_BEHAVIOUR == EWarnBehaviour.Attack && requester.Side == EPlayerSide.Bear;
return requester.IsAI && requesterMind.DEFAULT_BEAR_BEHAVIOUR == EWarnBehaviour.AlwaysEnemies && requester.Side == EPlayerSide.Bear;
}
}
}

View File

@ -61,7 +61,7 @@ namespace SPT.Debugging.Patches
}
[PatchPrefix]
public static bool PatchPrefix(GClass1503 __instance, BotCreationDataClass data)
public static bool PatchPrefix(GClass1573 __instance, BotCreationDataClass data)
{
var firstBotRole = data.Profiles[0].Info.Settings.Role;
if (firstBotRole != WildSpawnType.pmcBEAR || firstBotRole != WildSpawnType.pmcUSEC)

View File

@ -26,7 +26,7 @@ namespace SPT.Debugging.Patches
"\nMay Cause Unexpected Behaviors inraid")]
public static void Reload()
{
Reflection.Utils.ClientAppUtils.GetMainApp().method_52().HandleExceptions();
Reflection.Utils.ClientAppUtils.GetMainApp().method_51().HandleExceptions();
}
}
}

View File

@ -1,5 +1,6 @@
using System.Reflection;
using EFT;
using EFT.InventoryLogic;
using HarmonyLib;
using SPT.Reflection.Patching;
using SPT.Reflection.Utils;
@ -17,7 +18,7 @@ namespace SPT.SinglePlayer.Patches.RaidFix
}
[PatchPostfix]
public static void PatchPostfix(Profile profile, InventoryControllerClass inventoryController, ref AbstractQuestControllerClass ____questController, ref AbstractAchievementControllerClass ____achievementsController)
public static void PatchPostfix(Profile profile, InventoryController inventoryController, ref AbstractQuestControllerClass ____questController, ref AbstractAchievementControllerClass ____achievementsController)
{
var questController = new LocalQuestControllerClass(profile, inventoryController, PatchConstants.BackEndSession, true);
questController.Init();