v1.12.6.2 (Spring Update 2026)

This commit is contained in:
Regalis11
2026-04-09 15:10:07 +03:00
parent c8657caefa
commit a4607dffad
197 changed files with 5586 additions and 3461 deletions
@@ -1,16 +1,17 @@
#nullable enable
using Barotrauma.Extensions;
using Barotrauma.IO;
using Barotrauma.Items.Components;
using Barotrauma.Networking;
using Barotrauma.PerkBehaviors;
using FarseerPhysics;
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Xml.Linq;
using Barotrauma.Networking;
using Barotrauma.Extensions;
using Barotrauma.PerkBehaviors;
namespace Barotrauma
{
@@ -952,14 +953,6 @@ namespace Barotrauma
sub.SetPosition(spawnPos);
myPort.Dock(outPostPort);
myPort.Lock(isNetworkMessage: true, applyEffects: false);
foreach (var item in sub.GetItems(alsoFromConnectedSubs: true))
{
//need to refresh position to maintain since the sub was moved to the docking port
if (item.GetComponent<Steering>() is { MaintainPos: true } steering)
{
steering.RefreshPosToMaintain();
}
}
}
else
{
@@ -982,6 +975,16 @@ namespace Barotrauma
sub.EnableMaintainPosition();
}
foreach (var item in sub.GetItems(alsoFromConnectedSubs: true))
{
// Refresh pos to maintain in all steering components maintaining
// position, including ones in shuttles, since the submarines moved
if (item.GetComponent<Steering>() is { MaintainPos: true } steering)
{
steering.RefreshPosToMaintain();
}
}
// Make sure that linked subs which are NOT docked to the main sub
// (but still close enough to NOT be considered as 'left behind')
// are also moved to keep their relative position to the main sub
@@ -1094,7 +1097,7 @@ namespace Barotrauma
ImmutableHashSet<Character> crewCharacters = GetSessionCrewCharacters(CharacterType.Both);
int prevMoney = GetAmountOfMoney(crewCharacters);
EndMissions();
EndMissions(transitionType);
foreach (Character character in crewCharacters)
{
@@ -1197,12 +1200,12 @@ namespace Barotrauma
}
}
public void EndMissions()
public void EndMissions(CampaignMode.TransitionType transitionType)
{
ImmutableHashSet<Character> crewCharacters = GetSessionCrewCharacters(CharacterType.Both);
foreach (Mission mission in missions)
{
mission.End();
mission.End(transitionType);
}
if (missions.Any())