v0.18.15.0

This commit is contained in:
Regalis11
2022-07-14 16:54:36 +03:00
parent 497045de7e
commit 4a03ee5ab2
36 changed files with 240 additions and 151 deletions
@@ -330,7 +330,8 @@ namespace Barotrauma
{
Submarine.MainSub.CheckFuel();
SubmarineInfo nextSub = PendingSubmarineSwitch ?? Submarine.MainSub.Info;
if (Level.IsLoadedFriendlyOutpost && nextSub.LowFuel && CargoManager.PurchasedItems.None(i => i.Value.Any(pi => pi.ItemPrefab.Tags.Contains("reactorfuel"))))
bool lowFuel = nextSub.Name == Submarine.MainSub.Info.Name ? Submarine.MainSub.Info.LowFuel : nextSub.LowFuel;
if (Level.IsLoadedFriendlyOutpost && lowFuel && CargoManager.PurchasedItems.None(i => i.Value.Any(pi => pi.ItemPrefab.Tags.Contains("reactorfuel"))))
{
var extraConfirmationBox =
new GUIMessageBox(TextManager.Get("lowfuelheader"),
@@ -693,13 +693,15 @@ namespace Barotrauma
if (ShouldApply(NetFlags.SubList, id, requireUpToDateSave: false))
{
GameMain.GameSession.OwnedSubmarines.Clear();
foreach (int ownedSubIndex in ownedSubIndices)
{
SubmarineInfo sub = GameMain.Client.ServerSubmarines[ownedSubIndex];
if (GameMain.NetLobbyScreen.CheckIfCampaignSubMatches(sub, NetLobbyScreen.SubmarineDeliveryData.Owned))
{
GameMain.GameSession.OwnedSubmarines.Add(sub);
if (GameMain.GameSession.OwnedSubmarines.None(s => s.Name == sub.Name))
{
GameMain.GameSession.OwnedSubmarines.Add(sub);
}
}
}
}