v1.6.17.0 (Unto the Breach update)

This commit is contained in:
Regalis11
2024-10-22 17:29:04 +03:00
parent e74b3cdb17
commit 6e6c17e100
417 changed files with 17166 additions and 5870 deletions
@@ -59,12 +59,14 @@ namespace Barotrauma
protected override bool IsValidTarget(Item target)
{
if (target == null || target.Removed) { return false; }
// If the target was selected as a valid target, we'll have to accept it so that the objective can be completed.
// The validity changes when a character picks the item up.
if (!IsValidTarget(target, character, checkInventory: true))
{
return Objectives.ContainsKey(target) && AIObjectiveCleanupItems.IsItemInsideValidSubmarine(target, character);
}
//note that the item can be outside hulls and still be a valid target - it can be in the character's inventory
if (target.CurrentHull != null && target.CurrentHull.FireSources.Count > 0) { return false; }
foreach (Character c in Character.CharacterList)
@@ -96,7 +98,7 @@ namespace Barotrauma
private static bool IsValidTarget(Item item, Character character, bool checkInventory)
{
if (item == null) { return false; }
if (item == null || item.Removed) { return false; }
if (item.GetRootInventoryOwner() == character) { return true; }
return AIObjectiveCleanupItems.IsValidTarget(
item,