diff --git a/.github/DISCUSSION_TEMPLATE/bug-reports.yml b/.github/DISCUSSION_TEMPLATE/bug-reports.yml index 3a3c429d1..b37532282 100644 --- a/.github/DISCUSSION_TEMPLATE/bug-reports.yml +++ b/.github/DISCUSSION_TEMPLATE/bug-reports.yml @@ -73,8 +73,7 @@ body: label: Version description: Which version of the game did the bug happen in? You can see the current version number in the bottom left corner of your screen in the main menu. options: - - v1.3.0.4 - - v1.4.3.0 (unstable) + - v1.4.5.0 (Blood in the Water Update, hotfix 1) - Other validations: required: true diff --git a/Barotrauma/BarotraumaClient/ClientSource/DebugConsole.cs b/Barotrauma/BarotraumaClient/ClientSource/DebugConsole.cs index 0412ef274..0a205ec2f 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/DebugConsole.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/DebugConsole.cs @@ -2331,6 +2331,29 @@ namespace Barotrauma } })); + commands.Add(new Command("converttowreck", "", (string[] args) => + { + if (Screen.Selected is not SubEditorScreen) + { + ThrowError("The command can only be used in the submarine editor."); + return; + } + if (Submarine.MainSub == null) + { + ThrowError("Load a submarine first to convert it to a wreck."); + return; + } + if (Submarine.MainSub.Info.SubmarineElement == null) + { + ThrowError("The submarine must be saved before you can convert it to a wreck."); + return; + } + var wreckedSubmarineInfo = new SubmarineInfo(filePath: string.Empty, element: WreckConverter.ConvertToWreck(Submarine.MainSub.Info.SubmarineElement)); + wreckedSubmarineInfo.Name += "_Wrecked"; + wreckedSubmarineInfo.Type = SubmarineType.Wreck; + GameMain.SubEditorScreen.LoadSub(wreckedSubmarineInfo); + })); + #if DEBUG commands.Add(new Command("listspamfilters", "Lists filters that are in the global spam filter.", (string[] args) => { @@ -2444,29 +2467,6 @@ namespace Barotrauma } })); - commands.Add(new Command("converttowreck", "", (string[] args) => - { - if (Screen.Selected is not SubEditorScreen) - { - ThrowError("The command can only be used in the submarine editor."); - return; - } - if (Submarine.MainSub == null) - { - ThrowError("Load a submarine first to convert it to a wreck."); - return; - } - if (Submarine.MainSub.Info.SubmarineElement == null) - { - ThrowError("The submarine must be saved before you can convert it to a wreck."); - return; - } - var wreckedSubmarineInfo = new SubmarineInfo(filePath: string.Empty, element: WreckConverter.ConvertToWreck(Submarine.MainSub.Info.SubmarineElement)); - wreckedSubmarineInfo.Name += "_Wrecked"; - wreckedSubmarineInfo.Type = SubmarineType.Wreck; - GameMain.SubEditorScreen.LoadSub(wreckedSubmarineInfo); - })); - commands.Add(new Command("camerasettings", "camerasettings [defaultzoom] [zoomsmoothness] [movesmoothness] [minzoom] [maxzoom]: debug command for testing camera settings. The values default to 1.1, 8.0, 8.0, 0.1 and 2.0.", (string[] args) => { float defaultZoom = Screen.Selected.Cam.DefaultZoom; diff --git a/Barotrauma/BarotraumaClient/ClientSource/GUI/Store.cs b/Barotrauma/BarotraumaClient/ClientSource/GUI/Store.cs index daceed791..cd303b3ce 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/GUI/Store.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/GUI/Store.cs @@ -1735,7 +1735,7 @@ namespace Barotrauma if (!ItemAndAllContainersInteractable(subItem)) { continue; } //don't list items in a character inventory (the ones in a crew member's inventory are counted below) var rootInventoryOwner = subItem.GetRootInventoryOwner(); - if (rootInventoryOwner != null) { continue; } + if (rootInventoryOwner is Character) { continue; } AddOwnedItem(subItem); } } diff --git a/Barotrauma/BarotraumaClient/ClientSource/Networking/GameClient.cs b/Barotrauma/BarotraumaClient/ClientSource/Networking/GameClient.cs index dbfebfc11..4e0ca8790 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Networking/GameClient.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Networking/GameClient.cs @@ -1822,7 +1822,7 @@ namespace Barotrauma.Networking if (Screen.Selected != GameMain.GameScreen) { new GUIMessageBox(TextManager.Get("PleaseWait"), TextManager.Get(allowSpectating ? "RoundRunningSpectateEnabled" : "RoundRunningSpectateDisabled")); - if (!(Screen.Selected is ModDownloadScreen)) { GameMain.NetLobbyScreen.Select(); } + if (Screen.Selected is not ModDownloadScreen) { GameMain.NetLobbyScreen.Select(); } } } } diff --git a/Barotrauma/BarotraumaClient/ClientSource/Screens/NetLobbyScreen.cs b/Barotrauma/BarotraumaClient/ClientSource/Screens/NetLobbyScreen.cs index 14bd2d8a1..ca5efd9f1 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/Screens/NetLobbyScreen.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/Screens/NetLobbyScreen.cs @@ -57,6 +57,7 @@ namespace Barotrauma private GUILayoutGroup roundControlsHolder; public GUIButton SettingsButton { get; private set; } + public GUIButton ServerMessageButton { get; private set; } public static GUIButton JobInfoFrame { get; set; } private GUITickBox spectateBox; @@ -427,6 +428,20 @@ namespace Barotrauma TextGetter = serverNameShadow.TextGetter = () => GameMain.Client?.ServerName }; + ServerMessageButton = new GUIButton(new RectTransform(new Vector2(0.2f, 0.15f), serverInfoContent.RectTransform, Anchor.BottomLeft), + TextManager.Get("workshopitemdescription"), style: "GUIButtonSmall") + { + IgnoreLayoutGroups = true, + OnClicked = (bt, userdata) => + { + if (GameMain.Client?.ServerSettings is { } serverSettings) + { + CreateServerMessagePopup(serverSettings.ServerName, serverSettings.ServerMessageText); + } + return true; + } + }; + playStyleIconContainer = new GUILayoutGroup(new RectTransform(new Vector2(0.5f, 0.4f), serverInfoContent.RectTransform, Anchor.BottomRight), isHorizontal: true, childAnchor: Anchor.BottomRight) { AbsoluteSpacing = GUI.IntScale(5) @@ -455,8 +470,23 @@ namespace Barotrauma } }; - SettingsButton = new GUIButton(new RectTransform(new Vector2(0.25f, 1.0f), serverInfoContent.RectTransform, Anchor.TopRight), - TextManager.Get("ServerSettingsButton"), style: "GUIButtonSmall"); + SettingsButton = new GUIButton(new RectTransform(new Vector2(0.25f, 0.4f), serverInfoContent.RectTransform, Anchor.TopRight), + TextManager.Get("ServerSettingsButton"), style: "GUIButtonFreeScale"); + } + + private void CreateServerMessagePopup(string serverName, string message) + { + if (string.IsNullOrEmpty(message)) { return; } + var popup = new GUIMessageBox(serverName, string.Empty, minSize: new Point(GUI.IntScale(650), GUI.IntScale(650))); + //popup.Content.Stretch = true; + popup.Header.Font = GUIStyle.LargeFont; + popup.Header.RectTransform.MinSize = new Point(0, (int)popup.Header.TextSize.Y); + var textListBox = new GUIListBox(new RectTransform(new Vector2(1.0f, 0.7f), popup.Content.RectTransform)); + var text = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), textListBox.Content.RectTransform), message, wrap: true) + { + CanBeFocused = false + }; + text.RectTransform.MinSize = new Point(0, (int)text.TextSize.Y); } public void RefreshPlaystyleIcons() @@ -1474,7 +1504,8 @@ namespace Barotrauma } else { - GameMain.Client.RequestStartRound(); + //if a campaign is active, and we're not setting one up atm, start button continues the existing campaign + GameMain.Client.RequestStartRound(continueCampaign: GameMain.GameSession?.GameMode is CampaignMode && CampaignSetupFrame is not { Visible: true }); CoroutineManager.StartCoroutine(WaitForStartRound(StartButton), "WaitForStartRound"); } return true; @@ -1570,10 +1601,7 @@ namespace Barotrauma chatInput.OnTextChanged += GameMain.Client.TypingChatMessage; chatInput.OnDeselected += (sender, key) => { - if (GameMain.Client != null) - { - GameMain.Client.ChatBox.ChatManager.Clear(); - } + GameMain.Client?.ChatBox.ChatManager.Clear(); }; //disable/hide elements the clients are not supposed to use/see diff --git a/Barotrauma/BarotraumaClient/LinuxClient.csproj b/Barotrauma/BarotraumaClient/LinuxClient.csproj index 1fd816abb..cecd78552 100644 --- a/Barotrauma/BarotraumaClient/LinuxClient.csproj +++ b/Barotrauma/BarotraumaClient/LinuxClient.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma - 1.4.4.1 + 1.4.5.0 Copyright © FakeFish 2018-2023 AnyCPU;x64 Barotrauma diff --git a/Barotrauma/BarotraumaClient/MacClient.csproj b/Barotrauma/BarotraumaClient/MacClient.csproj index b3e7a9210..c08404e10 100644 --- a/Barotrauma/BarotraumaClient/MacClient.csproj +++ b/Barotrauma/BarotraumaClient/MacClient.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma - 1.4.4.1 + 1.4.5.0 Copyright © FakeFish 2018-2023 AnyCPU;x64 Barotrauma diff --git a/Barotrauma/BarotraumaClient/WindowsClient.csproj b/Barotrauma/BarotraumaClient/WindowsClient.csproj index fa8b4f45c..6078b2ace 100644 --- a/Barotrauma/BarotraumaClient/WindowsClient.csproj +++ b/Barotrauma/BarotraumaClient/WindowsClient.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma - 1.4.4.1 + 1.4.5.0 Copyright © FakeFish 2018-2023 AnyCPU;x64 Barotrauma diff --git a/Barotrauma/BarotraumaServer/LinuxServer.csproj b/Barotrauma/BarotraumaServer/LinuxServer.csproj index b8eabe66b..b5a341a83 100644 --- a/Barotrauma/BarotraumaServer/LinuxServer.csproj +++ b/Barotrauma/BarotraumaServer/LinuxServer.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma Dedicated Server - 1.4.4.1 + 1.4.5.0 Copyright © FakeFish 2018-2023 AnyCPU;x64 DedicatedServer diff --git a/Barotrauma/BarotraumaServer/MacServer.csproj b/Barotrauma/BarotraumaServer/MacServer.csproj index ec6c9f0cf..f103e344b 100644 --- a/Barotrauma/BarotraumaServer/MacServer.csproj +++ b/Barotrauma/BarotraumaServer/MacServer.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma Dedicated Server - 1.4.4.1 + 1.4.5.0 Copyright © FakeFish 2018-2023 AnyCPU;x64 DedicatedServer diff --git a/Barotrauma/BarotraumaServer/WindowsServer.csproj b/Barotrauma/BarotraumaServer/WindowsServer.csproj index ffe0a0cae..515e7d9c3 100644 --- a/Barotrauma/BarotraumaServer/WindowsServer.csproj +++ b/Barotrauma/BarotraumaServer/WindowsServer.csproj @@ -6,7 +6,7 @@ Barotrauma FakeFish, Undertow Games Barotrauma Dedicated Server - 1.4.4.1 + 1.4.5.0 Copyright © FakeFish 2018-2023 AnyCPU;x64 DedicatedServer diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveCleanupItem.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveCleanupItem.cs index df9c74e24..c200a173c 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveCleanupItem.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveCleanupItem.cs @@ -123,7 +123,7 @@ namespace Barotrauma { Abandon = true; } - else if (item.ParentInventory != null) + else if (item.ParentInventory != null && item.GetRootInventoryOwner() != character) { if (!objectiveManager.HasOrder()) { diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveGetItem.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveGetItem.cs index 2335d8f3c..717653432 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveGetItem.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectiveGetItem.cs @@ -368,7 +368,7 @@ namespace Barotrauma return new AIObjectiveGoTo(moveToTarget, character, objectiveManager, repeat: false, getDivingGearIfNeeded: AllowToFindDivingGear, closeEnough: DefaultReach) { // If the root container changes, the item is no longer where it was (taken by someone -> need to find another item) - AbortCondition = obj => targetItem == null || targetItem.GetRootInventoryOwner() != moveToTarget, + AbortCondition = obj => targetItem == null || (targetItem.GetRootInventoryOwner() is Entity owner && owner != moveToTarget && owner != character), SpeakIfFails = false, endNodeFilter = CreateEndNodeFilter(moveToTarget) }; diff --git a/Barotrauma/BarotraumaShared/SharedSource/Networking/ServerSettings.cs b/Barotrauma/BarotraumaShared/SharedSource/Networking/ServerSettings.cs index 8526f2f49..4bd094836 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/Networking/ServerSettings.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/Networking/ServerSettings.cs @@ -350,6 +350,12 @@ namespace Barotrauma.Networking if (serverMessageText == val) { return; } #if SERVER GameMain.Server?.SendChatMessage(TextManager.AddPunctuation(':', TextManager.Get("servermotd"), val).Value, ChatMessageType.Server); +#elif CLIENT + if (GameMain.NetLobbyScreen.ServerMessageButton is { } serverMessageButton) + { + serverMessageButton.Flash(GUIStyle.Green); + serverMessageButton.Pulsate(Vector2.One, Vector2.One * 1.2f, 1.0f); + } #endif serverMessageText = val; ServerDetailsChanged = true; diff --git a/Barotrauma/BarotraumaShared/SharedSource/StatusEffects/StatusEffect.cs b/Barotrauma/BarotraumaShared/SharedSource/StatusEffects/StatusEffect.cs index 60d399855..c382fab91 100644 --- a/Barotrauma/BarotraumaShared/SharedSource/StatusEffects/StatusEffect.cs +++ b/Barotrauma/BarotraumaShared/SharedSource/StatusEffects/StatusEffect.cs @@ -1129,16 +1129,16 @@ namespace Barotrauma { if (!file.TryGet(out ContentPath _) || (file.TryGet(out ContentPath contentPath) && contentPath.IsNullOrWhiteSpace())) { - DebugConsole.ThrowError($"Error in a element of {subElement.ParseContentPathFromUri()}: neither path nor filename defined!"); + DebugConsole.ThrowError($"Error in a element of {subElement.ParseContentPathFromUri()}: neither path nor filename defined!", + contentPackage: subElement.ContentPackage); + break; } } - else - { - float priority = subElement.GetAttributeFloat("priority", def: 0f); - Identifier[] expectedSpeciesNames = subElement.GetAttributeIdentifierArray("expectedspecies", Array.Empty()); - animationsToTrigger ??= new List(); - animationsToTrigger.Add(new AnimLoadInfo(animType, file, priority, expectedSpeciesNames.ToImmutableArray())); - } + float priority = subElement.GetAttributeFloat("priority", def: 0f); + Identifier[] expectedSpeciesNames = subElement.GetAttributeIdentifierArray("expectedspecies", Array.Empty()); + animationsToTrigger ??= new List(); + animationsToTrigger.Add(new AnimLoadInfo(animType, file, priority, expectedSpeciesNames.ToImmutableArray())); + break; } } diff --git a/Barotrauma/BarotraumaShared/changelog.txt b/Barotrauma/BarotraumaShared/changelog.txt index fa9b4e4be..18dfdfc4a 100644 --- a/Barotrauma/BarotraumaShared/changelog.txt +++ b/Barotrauma/BarotraumaShared/changelog.txt @@ -1,4 +1,18 @@ ------------------------------------------------------------------------------------------------------------------------------------------------- +v1.4.5.0 +------------------------------------------------------------------------------------------------------------------------------------------------- + +- Fixed crew remaining dead, mission remaining completed/failed, etc when you return to the lobby an restart the round. The issue was that the server did not properly load the previous save when opting to continue the ongoing campaign. +- Added a button to the server lobby which opens the server description in a popup to make it easier for players to find. We are still thinking of the best way to handle the description/MOTD, this is more of a quick band-aid solution for the description being too easy to miss / difficult to find at the moment. +- Fixed descriptions being outdated on some of the modified XP talents. Currently only fixed in English, the descriptions in other languages are still outdated. +- Fixed "command not found" error when trying to use the new "converttowreck" console command. +- Fixed items in a container in the submarine not being counted in the "owned items" count in the store interface. +- Fixed bots being unable to properly clean up some items, just taking them into their inventory and leaving them there. +- Fixed drinkable items (such as ethanol) giving the full effect with just a tiny sip. +- Fixed effect from the "revenge squad" talent only lasting 60 seconds. +- Fixed combat diving suit being slower than intended when using an underwater scooter. + +------------------------------------------------------------------------------------------------------------------------------------------------- v1.4.4.1 -------------------------------------------------------------------------------------------------------------------------------------------------