v1.6.18.1 (Unto the Breach Hotfix 1)

This commit is contained in:
Regalis11
2024-10-28 15:03:46 +02:00
parent a29662c074
commit 7eac44ea7d
47 changed files with 246 additions and 124 deletions
@@ -5709,13 +5709,17 @@ namespace Barotrauma
return sameRoomHulls.Contains(character.CurrentHull);
}
/// <summary>
/// Returns all friendly crew members that are alive.
/// Filters out pets and characters that don't have <see cref="CharacterInfo"/>.
/// </summary>
public static IEnumerable<Character> GetFriendlyCrew(Character character)
{
if (character is null)
{
return Enumerable.Empty<Character>();
}
return CharacterList.Where(c => HumanAIController.IsFriendly(character, c, onlySameTeam: true) && !c.IsDead);
return CharacterList.Where(c => c.Info != null && !c.IsDead && !c.IsPet && HumanAIController.IsFriendly(character, c, onlySameTeam: true));
}
public bool HasRecipeForItem(Identifier recipeIdentifier)