Unstable 1.1.14.0

This commit is contained in:
Markus Isberg
2023-10-02 16:43:54 +03:00
parent 94f5a93a0c
commit cf8f0de659
606 changed files with 21906 additions and 11456 deletions
@@ -12,6 +12,7 @@ namespace Barotrauma
public override Identifier Identifier { get; set; } = "cleanup item".ToIdentifier();
public override bool KeepDivingGearOn => true;
public override bool AllowAutomaticItemUnequipping => false;
public override bool AllowWhileHandcuffed => false;
public readonly Item item;
public bool IsPriority { get; set; }
@@ -30,8 +31,7 @@ namespace Barotrauma
{
if (!IsAllowed)
{
Priority = 0;
Abandon = true;
HandleNonAllowed();
return Priority;
}
else
@@ -119,18 +119,21 @@ namespace Barotrauma
if (item.IgnoreByAI(character))
{
Abandon = true;
return false;
}
if (item.ParentInventory != null)
else if (item.ParentInventory != null)
{
if (item.Container != null && !AIObjectiveCleanupItems.IsValidContainer(item.Container, character, allowUnloading: objectiveManager.HasOrder<AIObjectiveCleanupItems>()))
if (!objectiveManager.HasOrder<AIObjectiveCleanupItems>())
{
// Don't allow taking items from containers in the idle state.
Abandon = true;
}
else if (item.Container != null && !AIObjectiveCleanupItems.IsValidContainer(item.Container, character))
{
// Target was picked up or moved by someone.
Abandon = true;
return false;
}
}
return IsCompleted;
return !Abandon && IsCompleted;
}
public override void Reset()