From e2ce85884e7e0f565122d67b17a11425e3a19158 Mon Sep 17 00:00:00 2001
From: Markus Isberg <3e849f2e5c@pm.me>
Date: Fri, 17 Dec 2021 02:41:06 +0900
Subject: [PATCH] Hotfix 0.15.22.1
---
.../GameAnalytics/GameAnalyticsManager.cs | 17 +++++++++--------
.../BarotraumaClient/ClientSource/GameMain.cs | 2 +-
Barotrauma/BarotraumaClient/LinuxClient.csproj | 2 +-
Barotrauma/BarotraumaClient/MacClient.csproj | 2 +-
.../BarotraumaClient/WindowsClient.csproj | 2 +-
Barotrauma/BarotraumaServer/LinuxServer.csproj | 2 +-
Barotrauma/BarotraumaServer/MacServer.csproj | 2 +-
.../BarotraumaServer/WindowsServer.csproj | 2 +-
.../Items/Components/Machines/Deconstructor.cs | 15 +++++++++++----
Barotrauma/BarotraumaShared/changelog.txt | 9 +++++++--
10 files changed, 34 insertions(+), 21 deletions(-)
diff --git a/Barotrauma/BarotraumaClient/ClientSource/GameAnalytics/GameAnalyticsManager.cs b/Barotrauma/BarotraumaClient/ClientSource/GameAnalytics/GameAnalyticsManager.cs
index b8663977e..03683f3f8 100644
--- a/Barotrauma/BarotraumaClient/ClientSource/GameAnalytics/GameAnalyticsManager.cs
+++ b/Barotrauma/BarotraumaClient/ClientSource/GameAnalytics/GameAnalyticsManager.cs
@@ -1,8 +1,7 @@
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
using Barotrauma.IO;
using Microsoft.Xna.Framework;
+using System.Collections.Generic;
+using System.Linq;
namespace Barotrauma
{
@@ -13,7 +12,7 @@ namespace Barotrauma
if (consentTextAvailable)
{
var background = new GUIFrame(new RectTransform(Vector2.One, GUI.Canvas), style: "GUIBackgroundBlocker");
- var frame = new GUIFrame(new RectTransform(new Vector2(0.5f, 0.7f), background.RectTransform, Anchor.Center) { MaxSize = new Point(800, int.MaxValue) });
+ var frame = new GUIFrame(new RectTransform(new Vector2(0.5f, 0.7f), background.RectTransform, Anchor.Center) { MinSize = new Point(800, 0), MaxSize = new Point(1500, int.MaxValue) });
var content = new GUILayoutGroup(new RectTransform(new Vector2(0.95f), frame.RectTransform, Anchor.Center))
{
@@ -89,18 +88,20 @@ namespace Barotrauma
buttonContainer.RectTransform.MinSize = new Point(0, yesBtn.RectTransform.MinSize.Y);
buttonContainer.RectTransform.MaxSize = new Point(int.MaxValue, yesBtn.RectTransform.MinSize.Y);
+ content.Recalculate();
foreach (var child in content.Children)
{
if (child is GUITextBlock textBlock)
{
+ textBlock.TextScale = MathHelper.Min(1.0f, 1.0f / GameSettings.TextScale);
textBlock.RectTransform.MinSize = new Point(0, (int)textBlock.TextSize.Y);
- textBlock.RectTransform.MaxSize = new Point(int.MaxValue, (int)textBlock.TextSize.Y + GUI.IntScale(15));
+ textBlock.RectTransform.MaxSize = new Point(int.MaxValue, (int)textBlock.TextSize.Y);
}
}
- frame.RectTransform.MaxSize = new Point(
- frame.RectTransform.MaxSize.X,
- (int)(content.Children.Sum(c => c.RectTransform.MaxSize.Y + content.AbsoluteSpacing) / content.RectTransform.RelativeSize.Y));
+ int contentHeight = content.Children.Sum(c => c.RectTransform.MaxSize.Y + content.AbsoluteSpacing);
+ frame.RectTransform.MinSize = new Point(frame.RectTransform.MinSize.X, (int)(contentHeight / content.RectTransform.RelativeSize.Y));
+ frame.RectTransform.MaxSize = new Point(frame.RectTransform.MaxSize.X, (int)(contentHeight / content.RectTransform.RelativeSize.Y));
GUIMessageBox.MessageBoxes.Add(background);
}
diff --git a/Barotrauma/BarotraumaClient/ClientSource/GameMain.cs b/Barotrauma/BarotraumaClient/ClientSource/GameMain.cs
index 40e11476b..711834cf9 100644
--- a/Barotrauma/BarotraumaClient/ClientSource/GameMain.cs
+++ b/Barotrauma/BarotraumaClient/ClientSource/GameMain.cs
@@ -476,7 +476,7 @@ namespace Barotrauma
DebugConsole.Log("Selected content packages: " + string.Join(", ", Config.AllEnabledPackages.Select(cp => cp.Name)));
}
-#if !DEBUG
+#if !DEBUG && !OSX
GameAnalyticsManager.InitIfConsented();
#endif
diff --git a/Barotrauma/BarotraumaClient/LinuxClient.csproj b/Barotrauma/BarotraumaClient/LinuxClient.csproj
index 051aaebd2..9bd087b75 100644
--- a/Barotrauma/BarotraumaClient/LinuxClient.csproj
+++ b/Barotrauma/BarotraumaClient/LinuxClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 0.15.22.0
+ 0.15.22.1
Copyright © FakeFish 2018-2020
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaClient/MacClient.csproj b/Barotrauma/BarotraumaClient/MacClient.csproj
index 62ae50eed..79f8088a0 100644
--- a/Barotrauma/BarotraumaClient/MacClient.csproj
+++ b/Barotrauma/BarotraumaClient/MacClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 0.15.22.0
+ 0.15.22.1
Copyright © FakeFish 2018-2020
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaClient/WindowsClient.csproj b/Barotrauma/BarotraumaClient/WindowsClient.csproj
index d218e24c6..bad4553d8 100644
--- a/Barotrauma/BarotraumaClient/WindowsClient.csproj
+++ b/Barotrauma/BarotraumaClient/WindowsClient.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma
- 0.15.22.0
+ 0.15.22.1
Copyright © FakeFish 2018-2020
AnyCPU;x64
Barotrauma
diff --git a/Barotrauma/BarotraumaServer/LinuxServer.csproj b/Barotrauma/BarotraumaServer/LinuxServer.csproj
index 739219965..b3c51f3b8 100644
--- a/Barotrauma/BarotraumaServer/LinuxServer.csproj
+++ b/Barotrauma/BarotraumaServer/LinuxServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 0.15.22.0
+ 0.15.22.1
Copyright © FakeFish 2018-2020
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaServer/MacServer.csproj b/Barotrauma/BarotraumaServer/MacServer.csproj
index 9f9417a31..da76addf9 100644
--- a/Barotrauma/BarotraumaServer/MacServer.csproj
+++ b/Barotrauma/BarotraumaServer/MacServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 0.15.22.0
+ 0.15.22.1
Copyright © FakeFish 2018-2020
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaServer/WindowsServer.csproj b/Barotrauma/BarotraumaServer/WindowsServer.csproj
index cda6f2f4a..6901aac71 100644
--- a/Barotrauma/BarotraumaServer/WindowsServer.csproj
+++ b/Barotrauma/BarotraumaServer/WindowsServer.csproj
@@ -6,7 +6,7 @@
Barotrauma
FakeFish, Undertow Games
Barotrauma Dedicated Server
- 0.15.22.0
+ 0.15.22.1
Copyright © FakeFish 2018-2020
AnyCPU;x64
DedicatedServer
diff --git a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Deconstructor.cs b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Deconstructor.cs
index b3cf5316b..38420fcd6 100644
--- a/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Deconstructor.cs
+++ b/Barotrauma/BarotraumaShared/SharedSource/Items/Components/Machines/Deconstructor.cs
@@ -266,7 +266,6 @@ namespace Barotrauma.Items.Components
}
int amount = (int)amountMultiplier;
-
for (int i = 0; i < amount; i++)
{
Entity.Spawner.AddToSpawnQueue(itemPrefab, outputContainer.Inventory, condition, onSpawned: (Item spawnedItem) =>
@@ -276,16 +275,24 @@ namespace Barotrauma.Items.Components
for (int i = 0; i < outputContainer.Capacity; i++)
{
var containedItem = outputContainer.Inventory.GetItemAt(i);
+ bool combined = false;
if (containedItem?.OwnInventory != null)
{
foreach (Item subItem in containedItem.ContainedItems.ToList())
{
- if (subItem.Combine(spawnedItem, null)) { break; }
+ if (subItem.Combine(spawnedItem, null))
+ {
+ combined = true;
+ break;
+ }
}
}
- else if (containedItem?.Combine(spawnedItem, null) ?? false)
+ if (!combined)
{
- break;
+ if (containedItem?.Combine(spawnedItem, null) ?? false)
+ {
+ break;
+ }
}
}
PutItemsToLinkedContainer();
diff --git a/Barotrauma/BarotraumaShared/changelog.txt b/Barotrauma/BarotraumaShared/changelog.txt
index ec7de6e4c..e40a686b8 100644
--- a/Barotrauma/BarotraumaShared/changelog.txt
+++ b/Barotrauma/BarotraumaShared/changelog.txt
@@ -1,14 +1,19 @@
+---------------------------------------------------------------------------------------------------------
+v0.15.22.1
+---------------------------------------------------------------------------------------------------------
+
+- Fixed GameAnalytics consent prompt still going outside the window on small resolutions and/or large text sizes.
+- Fixed deconstructor not being able to put the items into containers in the output slots.
+
---------------------------------------------------------------------------------------------------------
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