diff --git a/Barotrauma/BarotraumaClient/ClientSource/GameSettings.cs b/Barotrauma/BarotraumaClient/ClientSource/GameSettings.cs
index 1d255522b..251487afb 100644
--- a/Barotrauma/BarotraumaClient/ClientSource/GameSettings.cs
+++ b/Barotrauma/BarotraumaClient/ClientSource/GameSettings.cs
@@ -660,17 +660,17 @@ namespace Barotrauma
GUITickBox vsyncTickBox = new GUITickBox(new RectTransform(tickBoxScale, leftColumn.RectTransform), TextManager.Get("EnableVSync"))
{
ToolTip = TextManager.Get("EnableVSyncToolTip"),
- OnSelected = (GUITickBox box) =>
- {
- VSyncEnabled = box.Selected;
- GameMain.GraphicsDeviceManager.SynchronizeWithVerticalRetrace = VSyncEnabled;
- GameMain.GraphicsDeviceManager.ApplyChanges();
- UnsavedSettings = true;
-
- return true;
- },
Selected = VSyncEnabled
};
+ vsyncTickBox.OnSelected = (GUITickBox box) =>
+ {
+ VSyncEnabled = box.Selected;
+ GameMain.GraphicsDeviceManager.SynchronizeWithVerticalRetrace = VSyncEnabled;
+ GameMain.GraphicsDeviceManager.ApplyChanges();
+ UnsavedSettings = true;
+
+ return true;
+ };
GUITickBox textureCompressionTickBox = new GUITickBox(new RectTransform(tickBoxScale, leftColumn.RectTransform), TextManager.Get("EnableTextureCompression"))
@@ -1456,6 +1456,7 @@ namespace Barotrauma
Step = 0.01f
};
textScaleScrollBar.OnMoved(textScaleScrollBar, textScaleScrollBar.BarScroll);
+ textScaleDirty = false;
/// Bottom buttons -------------------------------------------------------------
new GUIButton(new RectTransform(new Vector2(0.3f, 1.0f), buttonArea.RectTransform, Anchor.BottomLeft),
diff --git a/Barotrauma/BarotraumaClient/ClientSource/Items/Components/Machines/MiniMap.cs b/Barotrauma/BarotraumaClient/ClientSource/Items/Components/Machines/MiniMap.cs
index 1f2d6882f..8bda33a7a 100644
--- a/Barotrauma/BarotraumaClient/ClientSource/Items/Components/Machines/MiniMap.cs
+++ b/Barotrauma/BarotraumaClient/ClientSource/Items/Components/Machines/MiniMap.cs
@@ -710,7 +710,7 @@ namespace Barotrauma.Items.Components
if (item.CurrentHull is { } currentHull && currentHull == hull)
{
- Sprite pingCircle = GUI.Style.YouAreHereCircle.Sprite;
+ Sprite? pingCircle = GUI.Style.YouAreHereCircle?.Sprite;
if (pingCircle is null) { continue; }
Vector2 charPos = item.WorldPosition;
diff --git a/Barotrauma/BarotraumaClient/LinuxClient.csproj b/Barotrauma/BarotraumaClient/LinuxClient.csproj
index 05f279eee..051aaebd2 100644
--- a/Barotrauma/BarotraumaClient/LinuxClient.csproj
+++ b/Barotrauma/BarotraumaClient/LinuxClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 0.15.21.0
+ 0.15.22.0
Copyright © FakeFish 2018-2020
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaClient/MacClient.csproj b/Barotrauma/BarotraumaClient/MacClient.csproj
index 1d28c46fa..62ae50eed 100644
--- a/Barotrauma/BarotraumaClient/MacClient.csproj
+++ b/Barotrauma/BarotraumaClient/MacClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 0.15.21.0
+ 0.15.22.0
Copyright © FakeFish 2018-2020
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaClient/WindowsClient.csproj b/Barotrauma/BarotraumaClient/WindowsClient.csproj
index 57075882c..d218e24c6 100644
--- a/Barotrauma/BarotraumaClient/WindowsClient.csproj
+++ b/Barotrauma/BarotraumaClient/WindowsClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 0.15.21.0
+ 0.15.22.0
Copyright © FakeFish 2018-2020
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaServer/LinuxServer.csproj b/Barotrauma/BarotraumaServer/LinuxServer.csproj
index a126d0d41..739219965 100644
--- a/Barotrauma/BarotraumaServer/LinuxServer.csproj
+++ b/Barotrauma/BarotraumaServer/LinuxServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 0.15.21.0
+ 0.15.22.0
Copyright © FakeFish 2018-2020
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaServer/MacServer.csproj b/Barotrauma/BarotraumaServer/MacServer.csproj
index 63af8c10b..9f9417a31 100644
--- a/Barotrauma/BarotraumaServer/MacServer.csproj
+++ b/Barotrauma/BarotraumaServer/MacServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 0.15.21.0
+ 0.15.22.0
Copyright © FakeFish 2018-2020
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaServer/WindowsServer.csproj b/Barotrauma/BarotraumaServer/WindowsServer.csproj
index 5f24966aa..cda6f2f4a 100644
--- a/Barotrauma/BarotraumaServer/WindowsServer.csproj
+++ b/Barotrauma/BarotraumaServer/WindowsServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 0.15.21.0
+ 0.15.22.0
Copyright © FakeFish 2018-2020
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/Talents/Abilities/CharacterAbilityGainSimultaneousSkill.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/Talents/Abilities/CharacterAbilityGainSimultaneousSkill.cs
index 10d80a1a8..f2c500a54 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Characters/Talents/Abilities/CharacterAbilityGainSimultaneousSkill.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/Talents/Abilities/CharacterAbilityGainSimultaneousSkill.cs
@@ -18,7 +18,7 @@ namespace Barotrauma.Abilities
{
if (abilityObject is AbilitySkillGain abilitySkillGain)
{
- if (ignoreAbilitySkillGain && !abilitySkillGain.GainedFromAbility) { return; }
+ if (ignoreAbilitySkillGain && abilitySkillGain.GainedFromAbility) { return; }
Character.Info?.IncreaseSkillLevel(skillIdentifier, abilitySkillGain.Value, gainedFromAbility: true);
}
else
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Characters/Talents/Abilities/CustomAbilities/CharacterAbilityApprenticeship.cs b/Barotrauma/BarotraumaShared/SharedSource/Characters/Talents/Abilities/CustomAbilities/CharacterAbilityApprenticeship.cs
index 03f68259f..9bb79d132 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Characters/Talents/Abilities/CustomAbilities/CharacterAbilityApprenticeship.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Characters/Talents/Abilities/CustomAbilities/CharacterAbilityApprenticeship.cs
@@ -17,7 +17,7 @@ namespace Barotrauma.Abilities
{
if (abilityObject is AbilitySkillGain abilitySkillGain && abilitySkillGain.Character != Character)
{
- if (ignoreAbilitySkillGain && !abilitySkillGain.GainedFromAbility) { return; }
+ if (ignoreAbilitySkillGain && abilitySkillGain.GainedFromAbility) { return; }
Character.Info?.IncreaseSkillLevel(abilitySkillGain.String, 1.0f, gainedFromAbility: true);
}
}
diff --git a/Barotrauma/BarotraumaShared/SharedSource/DebugConsole.cs b/Barotrauma/BarotraumaShared/SharedSource/DebugConsole.cs
index 4aa5c1d8b..927c9a533 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/DebugConsole.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/DebugConsole.cs
@@ -2341,10 +2341,11 @@ namespace Barotrauma
}
if (e.InnerException != null)
{
- error += "\n\nInner exception: " + e.InnerException.Message + "\n";
- if (e.InnerException.StackTrace != null)
+ var innermost = e.GetInnermost();
+ error += "\n\nInner exception: " + innermost.Message + "\n";
+ if (innermost.StackTrace != null)
{
- error += e.InnerException.StackTrace.CleanupStackTrace(); ;
+ error += innermost.StackTrace.CleanupStackTrace(); ;
}
}
}
diff --git a/Barotrauma/BarotraumaShared/SharedSource/GameAnalytics/GameAnalyticsManager.cs b/Barotrauma/BarotraumaShared/SharedSource/GameAnalytics/GameAnalyticsManager.cs
index 77efeba8d..71a7a7a68 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/GameAnalytics/GameAnalyticsManager.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/GameAnalytics/GameAnalyticsManager.cs
@@ -203,12 +203,26 @@ namespace Barotrauma
private readonly Action? onQuit;
private void OnQuit()
{
- if (assembly != null) { onQuit?.Invoke(); }
+ try
+ {
+
+ if (assembly != null) { onQuit?.Invoke(); }
+ }
+ catch (Exception e)
+ {
+ e = e.GetInnermost();
+
+ DebugConsole.AddWarning($"Failed to call GameAnalytics.OnQuit: {e.Message} {e.StackTrace}");
+ //If this happens then GameAnalytics is just broken,
+ //let's just hope that it uninitialized correctly and
+ //allow the game to keep running
+ }
}
public void Dispose()
{
if (loadContext is null) { return; }
+
OnQuit();
loadContext?.Unload();
loadContext = null;
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Deconstructor.cs b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Deconstructor.cs
index 13ca3271a..b3cf5316b 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Deconstructor.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Deconstructor.cs
@@ -280,10 +280,7 @@ namespace Barotrauma.Items.Components
{
foreach (Item subItem in containedItem.ContainedItems.ToList())
{
- if (subItem.Combine(spawnedItem, null))
- {
- break;
- }
+ if (subItem.Combine(spawnedItem, null)) { break; }
}
}
else if (containedItem?.Combine(spawnedItem, null) ?? false)
@@ -302,12 +299,9 @@ namespace Barotrauma.Items.Components
foreach (ItemContainer ic in targetItem.GetComponents())
{
if (ic?.Inventory == null || ic.RemoveContainedItemsOnDeconstruct) { continue; }
- foreach (Item containedItem in ic.Inventory.AllItemsMod)
+ foreach (Item outputItem in ic.Inventory.AllItemsMod)
{
- if (!outputContainer.Inventory.TryPutItem(containedItem, user: null))
- {
- containedItem.Drop(dropper: null);
- }
+ tryPutInOutputSlots(outputItem);
}
}
inputContainer.Inventory.RemoveItem(targetItem);
@@ -317,13 +311,29 @@ namespace Barotrauma.Items.Components
}
else
{
- if (!outputContainer.Inventory.CanBePut(targetItem) || (Entity.Spawner?.IsInRemoveQueue(targetItem) ?? false))
+ if (Entity.Spawner?.IsInRemoveQueue(targetItem) ?? false)
{
targetItem.Drop(dropper: null);
}
else
{
- outputContainer.Inventory.TryPutItem(targetItem, user: null, createNetworkEvent: true);
+ tryPutInOutputSlots(targetItem);
+ }
+ }
+
+ void tryPutInOutputSlots(Item item)
+ {
+ for (int i = 0; i < outputContainer.Capacity; i++)
+ {
+ var containedItem = outputContainer.Inventory.GetItemAt(i);
+ if (containedItem?.OwnInventory != null && containedItem.OwnInventory.TryPutItem(item, user: null))
+ {
+ return;
+ }
+ }
+ if (!outputContainer.Inventory.TryPutItem(item, user: null))
+ {
+ item.Drop(dropper: null);
}
}
}
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Utils/ToolBox.cs b/Barotrauma/BarotraumaShared/SharedSource/Utils/ToolBox.cs
index 4233862e6..3c4e97c06 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Utils/ToolBox.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Utils/ToolBox.cs
@@ -704,5 +704,12 @@ namespace Barotrauma
Point topLeft = new Point(center.X - halfSize.X, center.Y + halfSize.Y);
return new Rectangle(topLeft, size);
}
+
+ public static Exception GetInnermost(this Exception e)
+ {
+ while (e.InnerException != null) { e = e.InnerException; }
+
+ return e;
+ }
}
}
diff --git a/Barotrauma/BarotraumaShared/Submarines/Kastrull.sub b/Barotrauma/BarotraumaShared/Submarines/Kastrull.sub
index 6089bab6b..2de8f93e6 100644
Binary files a/Barotrauma/BarotraumaShared/Submarines/Kastrull.sub and b/Barotrauma/BarotraumaShared/Submarines/Kastrull.sub differ
diff --git a/Barotrauma/BarotraumaShared/changelog.txt b/Barotrauma/BarotraumaShared/changelog.txt
index 18b9417a8..ec7de6e4c 100644
--- a/Barotrauma/BarotraumaShared/changelog.txt
+++ b/Barotrauma/BarotraumaShared/changelog.txt
@@ -1,3 +1,15 @@
+---------------------------------------------------------------------------------------------------------
+v0.15.22.0
+---------------------------------------------------------------------------------------------------------
+
+- Fixed crashing on startup on some versions of macOS.
+- Fixed GameAnalytics consent prompt going outside the window on small resolutions and/or large text sizes.
+- Fixed Kastrull's drone sometimes spawning inside the sub client-side in multiplayer.
+- Fixed opening the settings menu resetting the game window, which caused screen capture software to stop capturing the window.
+- Fixed certain mods that don't configure the "you are here" circle sprite for the status monitors causing crashes.
+- Fixed abilities that give simultaneous skill gain (minor in mechanics, once upon a time in europa, apprenticeship) not giving the extra skill points.
+- Fixed deconstructor not being able to put the items into containers in the output slots.
+
---------------------------------------------------------------------------------------------------------
v0.15.21.0
---------------------------------------------------------------------------------------------------------