Unstable 0.17.2.0

This commit is contained in:
Markus Isberg
2022-03-30 00:06:59 +09:00
parent 4206f6db42
commit 2968e23ae8
100 changed files with 654 additions and 1379 deletions
@@ -370,7 +370,6 @@ namespace Barotrauma.MapCreatures.Behavior
private BallastFloraBranch ReadBranch(IReadMessage msg)
{
int id = msg.ReadInt32();
bool isRootGrowth = msg.ReadBoolean();
byte type = (byte)msg.ReadRangedInteger(0b0000, 0b1111);
byte sides = (byte)msg.ReadRangedInteger(0b0000, 0b1111);
int flowerConfig = msg.ReadRangedInteger(0, 0xFFF);
@@ -386,8 +385,7 @@ namespace Barotrauma.MapCreatures.Behavior
{
ID = id,
MaxHealth = maxHealth,
Sides = (TileSide) sides,
IsRootGrowth = isRootGrowth
Sides = (TileSide) sides
};
}
}
@@ -272,7 +272,11 @@ namespace Barotrauma
private GUIComponent CreateEditingHUD()
{
editingHUD = new GUIFrame(new RectTransform(new Vector2(0.3f, 0.15f), GUI.Canvas, Anchor.CenterRight) { MinSize = new Point(400, 0) })
int width = 500;
int height = spawnType == SpawnType.Path ? 80 : 200;
int x = GameMain.GraphicsWidth / 2 - width / 2, y = 30;
editingHUD = new GUIFrame(new RectTransform(new Point(width, height), GUI.Canvas) { ScreenSpaceOffset = new Point(x, y) })
{
UserData = this
};
@@ -280,7 +284,7 @@ namespace Barotrauma
var paddedFrame = new GUILayoutGroup(new RectTransform(new Vector2(0.9f, 0.85f), editingHUD.RectTransform, Anchor.Center))
{
Stretch = true,
AbsoluteSpacing = (int)(GUI.Scale * 5)
RelativeSpacing = 0.05f
};
if (spawnType == SpawnType.Path)
@@ -414,10 +418,6 @@ namespace Barotrauma
};
}
editingHUD.RectTransform.Resize(new Point(
editingHUD.Rect.Width,
(int)(paddedFrame.Children.Sum(c => c.Rect.Height + paddedFrame.AbsoluteSpacing) / paddedFrame.RectTransform.RelativeSize.Y)));
PositionEditingHUD();
return editingHUD;