Release 1.10.5.0 - Autumn Update 2025

This commit is contained in:
Regalis11
2025-09-17 13:44:21 +03:00
parent d13836ce87
commit caa0326cf8
120 changed files with 2584 additions and 635 deletions
@@ -5,6 +5,7 @@ using Microsoft.Xna.Framework;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Runtime.InteropServices;
using System.Xml.Linq;
using static Barotrauma.CharacterParams;
@@ -434,6 +435,21 @@ namespace Barotrauma
var petBehavior = (c.AIController as EnemyAIController)?.PetBehavior;
if (petBehavior == null) { continue; }
//never save hostile pets or pets left outside
if (c.TeamID == CharacterTeamType.None ||
c.TeamID == CharacterTeamType.Team2 ||
c.Submarine == null)
{
continue;
}
//pets must be in a player sub or owned by someone to be persistent
if (c.Submarine is not { Info.IsPlayer: true } &&
petBehavior.Owner is not { IsOnPlayerTeam: true })
{
continue;
}
XElement petElement = new XElement("pet",
new XAttribute("speciesname", c.SpeciesName),
new XAttribute("ownerhash", petBehavior.Owner?.Info?.GetIdentifier() ?? 0),