Blood in the Water Hotfix 2 - 1.4.6.0

This commit is contained in:
Markus Isberg
2024-05-02 14:08:04 +03:00
parent ff1b8951a7
commit 0a0a9784c5
26 changed files with 304 additions and 191 deletions
@@ -123,7 +123,7 @@ namespace Barotrauma
{
Abandon = true;
}
else if (item.ParentInventory != null)
else if (item.ParentInventory != null && item.GetRootInventoryOwner() != character)
{
if (!objectiveManager.HasOrder<AIObjectiveCleanupItems>())
{
@@ -368,7 +368,7 @@ namespace Barotrauma
return new AIObjectiveGoTo(moveToTarget, character, objectiveManager, repeat: false, getDivingGearIfNeeded: AllowToFindDivingGear, closeEnough: DefaultReach)
{
// If the root container changes, the item is no longer where it was (taken by someone -> need to find another item)
AbortCondition = obj => targetItem == null || targetItem.GetRootInventoryOwner() != moveToTarget,
AbortCondition = obj => targetItem == null || (targetItem.GetRootInventoryOwner() is Entity owner && owner != moveToTarget && owner != character),
SpeakIfFails = false,
endNodeFilter = CreateEndNodeFilter(moveToTarget)
};