This commit is contained in:
Evil Factory
2021-12-16 15:09:48 -03:00
10 changed files with 34 additions and 21 deletions
@@ -1,8 +1,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using Barotrauma.IO; using Barotrauma.IO;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
using System.Collections.Generic;
using System.Linq;
namespace Barotrauma namespace Barotrauma
{ {
@@ -13,7 +12,7 @@ namespace Barotrauma
if (consentTextAvailable) if (consentTextAvailable)
{ {
var background = new GUIFrame(new RectTransform(Vector2.One, GUI.Canvas), style: "GUIBackgroundBlocker"); 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)) 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.MinSize = new Point(0, yesBtn.RectTransform.MinSize.Y);
buttonContainer.RectTransform.MaxSize = new Point(int.MaxValue, yesBtn.RectTransform.MinSize.Y); buttonContainer.RectTransform.MaxSize = new Point(int.MaxValue, yesBtn.RectTransform.MinSize.Y);
content.Recalculate();
foreach (var child in content.Children) foreach (var child in content.Children)
{ {
if (child is GUITextBlock textBlock) 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.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( int contentHeight = content.Children.Sum(c => c.RectTransform.MaxSize.Y + content.AbsoluteSpacing);
frame.RectTransform.MaxSize.X, frame.RectTransform.MinSize = new Point(frame.RectTransform.MinSize.X, (int)(contentHeight / content.RectTransform.RelativeSize.Y));
(int)(content.Children.Sum(c => c.RectTransform.MaxSize.Y + content.AbsoluteSpacing) / content.RectTransform.RelativeSize.Y)); frame.RectTransform.MaxSize = new Point(frame.RectTransform.MaxSize.X, (int)(contentHeight / content.RectTransform.RelativeSize.Y));
GUIMessageBox.MessageBoxes.Add(background); GUIMessageBox.MessageBoxes.Add(background);
} }
@@ -480,7 +480,7 @@ namespace Barotrauma
DebugConsole.Log("Selected content packages: " + string.Join(", ", Config.AllEnabledPackages.Select(cp => cp.Name))); DebugConsole.Log("Selected content packages: " + string.Join(", ", Config.AllEnabledPackages.Select(cp => cp.Name)));
} }
#if !DEBUG #if !DEBUG && !OSX
GameAnalyticsManager.InitIfConsented(); GameAnalyticsManager.InitIfConsented();
#endif #endif
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product> <Product>Barotrauma</Product>
<Version>0.15.22.0</Version> <Version>0.15.22.1</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright> <Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName> <AssemblyName>Barotrauma</AssemblyName>
+1 -1
View File
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product> <Product>Barotrauma</Product>
<Version>0.15.22.0</Version> <Version>0.15.22.1</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright> <Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName> <AssemblyName>Barotrauma</AssemblyName>
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product> <Product>Barotrauma</Product>
<Version>0.15.22.0</Version> <Version>0.15.22.1</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright> <Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName> <AssemblyName>Barotrauma</AssemblyName>
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product> <Product>Barotrauma Dedicated Server</Product>
<Version>0.15.22.0</Version> <Version>0.15.22.1</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright> <Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName> <AssemblyName>DedicatedServer</AssemblyName>
+1 -1
View File
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product> <Product>Barotrauma Dedicated Server</Product>
<Version>0.15.22.0</Version> <Version>0.15.22.1</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright> <Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName> <AssemblyName>DedicatedServer</AssemblyName>
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace> <RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors> <Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma Dedicated Server</Product> <Product>Barotrauma Dedicated Server</Product>
<Version>0.15.22.0</Version> <Version>0.15.22.1</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright> <Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<AssemblyName>DedicatedServer</AssemblyName> <AssemblyName>DedicatedServer</AssemblyName>
@@ -266,7 +266,6 @@ namespace Barotrauma.Items.Components
} }
int amount = (int)amountMultiplier; int amount = (int)amountMultiplier;
for (int i = 0; i < amount; i++) for (int i = 0; i < amount; i++)
{ {
Entity.Spawner.AddToSpawnQueue(itemPrefab, outputContainer.Inventory, condition, onSpawned: (Item spawnedItem) => 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++) for (int i = 0; i < outputContainer.Capacity; i++)
{ {
var containedItem = outputContainer.Inventory.GetItemAt(i); var containedItem = outputContainer.Inventory.GetItemAt(i);
bool combined = false;
if (containedItem?.OwnInventory != null) if (containedItem?.OwnInventory != null)
{ {
foreach (Item subItem in containedItem.ContainedItems.ToList()) 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(); PutItemsToLinkedContainer();
+7 -2
View File
@@ -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 v0.15.22.0
--------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------
- Fixed crashing on startup on some versions of macOS. - 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 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 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 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 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 v0.15.21.0