mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 06:10:45 -05:00
Patch updates
This commit is contained in:
parent
044952e19f
commit
853a74a449
@ -43,6 +43,7 @@ namespace SPT.Custom.CustomAI
|
|||||||
|
|
||||||
public void ConfigurePMCFindInRaidStatus(BotOwner ___botOwner_0)
|
public void ConfigurePMCFindInRaidStatus(BotOwner ___botOwner_0)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Must run before the container loot code, otherwise backpack loot is not FiR
|
// Must run before the container loot code, otherwise backpack loot is not FiR
|
||||||
MakeEquipmentNotFiR(___botOwner_0);
|
MakeEquipmentNotFiR(___botOwner_0);
|
||||||
|
|
||||||
@ -73,15 +74,18 @@ namespace SPT.Custom.CustomAI
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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)
|
// 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))
|
if (container.Name == "TacticalVest" && nonFiRItems.Any(parentId.Contains))
|
||||||
{
|
{
|
||||||
//this.logger.LogError($"Skipping item {item.Id} {item.Name} as its on the item type blacklist");
|
//this.logger.LogError($"Skipping item {item.Id} {item.Name} as its on the item type blacklist");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't add FiR to weapons in backpack (server sometimes adds pre-made weapons to backpack to simulate PMCs looting bodies)
|
// 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
|
// Add weapon root to list for later use
|
||||||
nonFiRRootItems.Add(item);
|
nonFiRRootItems.Add(item);
|
||||||
@ -90,7 +94,7 @@ namespace SPT.Custom.CustomAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Don't add FiR to grenades/mags/ammo/meds in pockets
|
// 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");
|
//this.logger.LogError($"Skipping item {item.Id} {item.Name} as its on the item type blacklist");
|
||||||
continue;
|
continue;
|
||||||
|
@ -109,7 +109,7 @@ namespace SPT.Custom.Patches
|
|||||||
return false;
|
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>
|
/// <summary>
|
||||||
@ -126,7 +126,7 @@ namespace SPT.Custom.Patches
|
|||||||
return false;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ namespace SPT.Debugging.Patches
|
|||||||
}
|
}
|
||||||
|
|
||||||
[PatchPrefix]
|
[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;
|
var firstBotRole = data.Profiles[0].Info.Settings.Role;
|
||||||
if (firstBotRole != WildSpawnType.pmcBEAR || firstBotRole != WildSpawnType.pmcUSEC)
|
if (firstBotRole != WildSpawnType.pmcBEAR || firstBotRole != WildSpawnType.pmcUSEC)
|
||||||
|
@ -26,7 +26,7 @@ namespace SPT.Debugging.Patches
|
|||||||
"\nMay Cause Unexpected Behaviors inraid")]
|
"\nMay Cause Unexpected Behaviors inraid")]
|
||||||
public static void Reload()
|
public static void Reload()
|
||||||
{
|
{
|
||||||
Reflection.Utils.ClientAppUtils.GetMainApp().method_52().HandleExceptions();
|
Reflection.Utils.ClientAppUtils.GetMainApp().method_51().HandleExceptions();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using EFT;
|
using EFT;
|
||||||
|
using EFT.InventoryLogic;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using SPT.Reflection.Patching;
|
using SPT.Reflection.Patching;
|
||||||
using SPT.Reflection.Utils;
|
using SPT.Reflection.Utils;
|
||||||
@ -17,7 +18,7 @@ namespace SPT.SinglePlayer.Patches.RaidFix
|
|||||||
}
|
}
|
||||||
|
|
||||||
[PatchPostfix]
|
[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);
|
var questController = new LocalQuestControllerClass(profile, inventoryController, PatchConstants.BackEndSession, true);
|
||||||
questController.Init();
|
questController.Init();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user