diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index c6b2f18fa..dfc828183 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -51,10 +51,8 @@ body:
attributes:
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:
- - 0.17.16.0
- - 0.18.10.0 (Unstable)
- - 0.18.9.0 (Unstable)
+ options:
+ - 0.18.12.0
- Other
validations:
required: true
diff --git a/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/DoctorTutorial.cs b/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/DoctorTutorial.cs
index 41a8238bd..8d9ef63b1 100644
--- a/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/DoctorTutorial.cs
+++ b/Barotrauma/BarotraumaClient/ClientSource/GameSession/GameModes/Tutorials/DoctorTutorial.cs
@@ -251,7 +251,7 @@ namespace Barotrauma.Tutorials
yield return new WaitForSeconds(2.0f);
}*/
- TriggerTutorialSegment(0, GameSettings.CurrentConfig.KeyMap.KeyBindText(InputType.Select), GameSettings.CurrentConfig.KeyMap.KeyBindText(InputType.Deselect)); // Medical supplies objective
+ TriggerTutorialSegment(0, GameSettings.CurrentConfig.KeyMap.KeyBindText(InputType.Select), GameSettings.CurrentConfig.KeyMap.KeyBindText(InputType.Deselect), "None"); // Medical supplies objective
do
{
diff --git a/Barotrauma/BarotraumaClient/ClientSource/Items/Components/ItemComponent.cs b/Barotrauma/BarotraumaClient/ClientSource/Items/Components/ItemComponent.cs
index 9b287cbd1..d331fc8a7 100644
--- a/Barotrauma/BarotraumaClient/ClientSource/Items/Components/ItemComponent.cs
+++ b/Barotrauma/BarotraumaClient/ClientSource/Items/Components/ItemComponent.cs
@@ -405,13 +405,13 @@ namespace Barotrauma.Items.Components
float newVolume;
try
{
- newVolume = Math.Min(property.GetFloatValue(this), 1.0f);
+ newVolume = property.GetFloatValue(this);
}
catch
{
return 0.0f;
}
- newVolume *= sound.VolumeMultiplier;
+ newVolume = Math.Min(newVolume * sound.VolumeMultiplier, 1.0f);
if (!MathUtils.IsValid(newVolume))
{
diff --git a/Barotrauma/BarotraumaClient/LinuxClient.csproj b/Barotrauma/BarotraumaClient/LinuxClient.csproj
index debc473b4..a9ef56dd6 100644
--- a/Barotrauma/BarotraumaClient/LinuxClient.csproj
+++ b/Barotrauma/BarotraumaClient/LinuxClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 0.18.11.0
+ 0.18.12.0
Copyright © FakeFish 2018-2022
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaClient/MacClient.csproj b/Barotrauma/BarotraumaClient/MacClient.csproj
index 444c99323..acc5e5e9b 100644
--- a/Barotrauma/BarotraumaClient/MacClient.csproj
+++ b/Barotrauma/BarotraumaClient/MacClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 0.18.11.0
+ 0.18.12.0
Copyright © FakeFish 2018-2022
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaClient/WindowsClient.csproj b/Barotrauma/BarotraumaClient/WindowsClient.csproj
index 9b7c77cde..642014f3f 100644
--- a/Barotrauma/BarotraumaClient/WindowsClient.csproj
+++ b/Barotrauma/BarotraumaClient/WindowsClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 0.18.11.0
+ 0.18.12.0
Copyright © FakeFish 2018-2022
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaServer/LinuxServer.csproj b/Barotrauma/BarotraumaServer/LinuxServer.csproj
index e25eef3ff..85283c39b 100644
--- a/Barotrauma/BarotraumaServer/LinuxServer.csproj
+++ b/Barotrauma/BarotraumaServer/LinuxServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 0.18.11.0
+ 0.18.12.0
Copyright © FakeFish 2018-2022
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaServer/MacServer.csproj b/Barotrauma/BarotraumaServer/MacServer.csproj
index 9ad776c12..45b2236d4 100644
--- a/Barotrauma/BarotraumaServer/MacServer.csproj
+++ b/Barotrauma/BarotraumaServer/MacServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 0.18.11.0
+ 0.18.12.0
Copyright © FakeFish 2018-2022
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaServer/ServerSource/Networking/OrderChatMessage.cs b/Barotrauma/BarotraumaServer/ServerSource/Networking/OrderChatMessage.cs
index d8d509a43..1aad3a99d 100644
--- a/Barotrauma/BarotraumaServer/ServerSource/Networking/OrderChatMessage.cs
+++ b/Barotrauma/BarotraumaServer/ServerSource/Networking/OrderChatMessage.cs
@@ -19,7 +19,8 @@ namespace Barotrauma.Networking
if (Sender != null && c.InGame)
{
msg.Write(Sender.ID);
- }
+ }
+ msg.Write(false); //text color (no custom text colors for order messages)
msg.WritePadBits();
WriteOrder(msg);
}
diff --git a/Barotrauma/BarotraumaServer/WindowsServer.csproj b/Barotrauma/BarotraumaServer/WindowsServer.csproj
index 83241ba57..b1c045756 100644
--- a/Barotrauma/BarotraumaServer/WindowsServer.csproj
+++ b/Barotrauma/BarotraumaServer/WindowsServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 0.18.11.0
+ 0.18.12.0
Copyright © FakeFish 2018-2022
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectivePumpWater.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectivePumpWater.cs
index eb232b4f2..72d84b107 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectivePumpWater.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/AI/Objectives/AIObjectivePumpWater.cs
@@ -31,8 +31,9 @@ namespace Barotrauma
if (!pump.Item.IsInteractable(character)) { return false; }
if (pump.IsAutoControlled) { return false; }
if (pump.Item.ConditionPercentage <= 0) { return false; }
+ if (pump.Item.CurrentHull == null) { return false; }
if (pump.Item.CurrentHull.FireSources.Count > 0) { return false; }
- if (character.Submarine != null)
+ if (character.Submarine != null && pump.Item.Submarine != null)
{
if (!character.Submarine.IsConnectedTo(pump.Item.Submarine)) { return false; }
}
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs
index 531f9c42f..ec9859a6e 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/Character.cs
@@ -1033,21 +1033,30 @@ namespace Barotrauma
/// Is the character controlled by AI.
/// Should clients receive a network event about the creation of this character?
/// Ragdoll configuration file. If null, will select the default.
- public static Character Create(string speciesName, Vector2 position, string seed, CharacterInfo characterInfo = null, ushort id = Entity.NullEntityID, bool isRemotePlayer = false, bool hasAi = true, bool createNetworkEvent = true, RagdollParams ragdoll = null)
+ public static Character Create(string speciesName, Vector2 position, string seed, CharacterInfo characterInfo = null, ushort id = Entity.NullEntityID, bool isRemotePlayer = false, bool hasAi = true, bool createNetworkEvent = true, RagdollParams ragdoll = null, bool throwErrorIfNotFound = true)
{
if (speciesName.EndsWith(".xml", StringComparison.OrdinalIgnoreCase))
{
speciesName = Path.GetFileNameWithoutExtension(speciesName);
}
- return Create(speciesName.ToIdentifier(), position, seed, characterInfo, id, isRemotePlayer, hasAi, createNetworkEvent, ragdoll);
+ return Create(speciesName.ToIdentifier(), position, seed, characterInfo, id, isRemotePlayer, hasAi, createNetworkEvent, ragdoll, throwErrorIfNotFound);
}
- public static Character Create(Identifier speciesName, Vector2 position, string seed, CharacterInfo characterInfo = null, ushort id = Entity.NullEntityID, bool isRemotePlayer = false, bool hasAi = true, bool createNetworkEvent = true, RagdollParams ragdoll = null)
+ public static Character Create(Identifier speciesName, Vector2 position, string seed, CharacterInfo characterInfo = null, ushort id = Entity.NullEntityID, bool isRemotePlayer = false, bool hasAi = true, bool createNetworkEvent = true, RagdollParams ragdoll = null, bool throwErrorIfNotFound = true)
{
var prefab = CharacterPrefab.FindBySpeciesName(speciesName);
if (prefab == null)
{
- DebugConsole.ThrowError($"Failed to create character \"{speciesName}\". Matching prefab not found.\n" + Environment.StackTrace);
+ string errorMsg = $"Failed to create character \"{speciesName}\". Matching prefab not found.\n" + Environment.StackTrace;
+ if (throwErrorIfNotFound)
+ {
+ DebugConsole.ThrowError(errorMsg);
+ }
+ else
+ {
+ DebugConsole.AddWarning(errorMsg);
+ }
+
return null;
}
return Create(prefab, position, seed, characterInfo, id, isRemotePlayer, hasAi, createNetworkEvent, ragdoll);
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Events/MonsterEvent.cs b/Barotrauma/BarotraumaShared/SharedSource/Events/MonsterEvent.cs
index 7ca86a794..c26b3f54b 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Events/MonsterEvent.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Events/MonsterEvent.cs
@@ -532,7 +532,13 @@ namespace Barotrauma
}
}
- Character createdCharacter = Character.Create(SpeciesName, pos, seed, characterInfo: null, isRemotePlayer: false, hasAi: true, createNetworkEvent: true);
+ Character createdCharacter = Character.Create(SpeciesName, pos, seed, characterInfo: null, isRemotePlayer: false, hasAi: true, createNetworkEvent: true, throwErrorIfNotFound: false);
+ if (createdCharacter == null)
+ {
+ disallowed = true;
+ return;
+ }
+
var eventManager = GameMain.GameSession.EventManager;
if (eventManager != null)
{
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Text/LocalizedString/FormattedLString.cs b/Barotrauma/BarotraumaShared/SharedSource/Text/LocalizedString/FormattedLString.cs
index 7e652ecec..81dd240f1 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Text/LocalizedString/FormattedLString.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Text/LocalizedString/FormattedLString.cs
@@ -1,4 +1,5 @@
#nullable enable
+using System;
using System.Collections.Immutable;
using System.Linq;
@@ -18,7 +19,14 @@ namespace Barotrauma
public override void RetrieveValue()
{
//TODO: possibly broken!
- cachedValue = string.Format(str.Value, subStrs.Select(s => s.Value as object).ToArray());
+ try
+ {
+ cachedValue = string.Format(str.Value, subStrs.Select(s => s.Value as object).ToArray());
+ }
+ catch (FormatException)
+ {
+ cachedValue = str.Value;
+ }
UpdateLanguage();
}
}
diff --git a/Barotrauma/BarotraumaShared/changelog.txt b/Barotrauma/BarotraumaShared/changelog.txt
index bc2dec55c..5758bd7e9 100644
--- a/Barotrauma/BarotraumaShared/changelog.txt
+++ b/Barotrauma/BarotraumaShared/changelog.txt
@@ -1,3 +1,17 @@
+---------------------------------------------------------------------------------------------------------
+v0.18.12.0
+---------------------------------------------------------------------------------------------------------
+
+- Fixed medical doctor tutorial throwing an error and freezing in most languages other than English.
+- Fixed occasional disconnects with the error "the given key was not present in the dictionary" when giving orders or reporting things in multiplayer.
+- Fixed occasional crashes caused by AIObjectivePumpWater.
+- Fixed certain looping item sounds (oxygen generators, vents, reactor) being too quiet to hear.
+- Fixed one of texts not appearing in the "captive souls" event.
+- Fixed inability to fabricate rubber shells.
+
+Modding:
+- Fixed crashing when a MonsterEvent fails to find the character prefab.
+
---------------------------------------------------------------------------------------------------------
v0.18.11.0
---------------------------------------------------------------------------------------------------------