Release 1.9.7.0 - Summer Update 2025
This commit is contained in:
@@ -434,12 +434,19 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
foreach (FabricationRecipe fi in fabricationRecipes.Values)
|
||||
{
|
||||
RichString recipeTooltip = RichString.Rich(fi.TargetItem.Description);
|
||||
if (fi.RequiresRecipe)
|
||||
{
|
||||
recipeTooltip += "\n\n" + $"‖color:{XMLExtensions.ToStringHex(GUIStyle.Red)}‖{TextManager.Get("fabricatorrequiresrecipe")}‖color:end‖";
|
||||
}
|
||||
recipeTooltip = RichString.Rich(recipeTooltip);
|
||||
|
||||
var frame = new GUIFrame(new RectTransform(new Point(itemList.Content.Rect.Width, (int)(40 * GUI.yScale)), itemList.Content.RectTransform), style: null)
|
||||
{
|
||||
UserData = fi,
|
||||
HoverColor = Color.Gold * 0.2f,
|
||||
SelectedColor = Color.Gold * 0.5f,
|
||||
ToolTip = RichString.Rich(fi.TargetItem.Description)
|
||||
ToolTip = recipeTooltip
|
||||
};
|
||||
|
||||
var container = new GUILayoutGroup(new RectTransform(Vector2.One, frame.RectTransform),
|
||||
@@ -451,8 +458,8 @@ namespace Barotrauma.Items.Components
|
||||
new GUIImage(new RectTransform(new Point(frame.Rect.Height,frame.Rect.Height), container.RectTransform),
|
||||
itemIcon, scaleToFit: true)
|
||||
{
|
||||
Color = fi.TargetItem.InventoryIconColor,
|
||||
ToolTip = RichString.Rich(fi.TargetItem.Description)
|
||||
Color = itemIcon == fi.TargetItem.Sprite ? fi.TargetItem.SpriteColor : fi.TargetItem.InventoryIconColor,
|
||||
ToolTip = recipeTooltip
|
||||
};
|
||||
}
|
||||
|
||||
@@ -461,7 +468,7 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
Padding = Vector4.Zero,
|
||||
AutoScaleVertical = true,
|
||||
ToolTip = RichString.Rich(fi.TargetItem.Description)
|
||||
ToolTip = recipeTooltip
|
||||
};
|
||||
|
||||
new GUITextBlock(new RectTransform(new Vector2(0.85f, 1f), frame.RectTransform, Anchor.BottomRight),
|
||||
@@ -513,7 +520,7 @@ namespace Barotrauma.Items.Components
|
||||
var nonItems = itemList.Content.Children.Where(c => c.UserData is not FabricationRecipe).ToList();
|
||||
nonItems.ForEach(i => i.Visible = false);
|
||||
|
||||
SortItems(character: null);
|
||||
SortItems(character);
|
||||
FilterEntities(selectedItemCategory, itemFilterBox?.Text ?? string.Empty);
|
||||
HideEmptyItemListCategories();
|
||||
}
|
||||
@@ -1196,6 +1203,15 @@ namespace Barotrauma.Items.Components
|
||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), paddedReqFrame.RectTransform), TextManager.FormatCurrency(SelectedItem.RequiredMoney),
|
||||
font: GUIStyle.SmallFont);
|
||||
}
|
||||
|
||||
if (selectedRecipe.RequiresRecipe && !AnyOneHasRecipeForItem(Character.Controlled, selectedRecipe.TargetItem))
|
||||
{
|
||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), paddedReqFrame.RectTransform),
|
||||
TextManager.Get("fabricatorrequiresrecipe"), textColor: GUIStyle.Red, font: GUIStyle.SubHeadingFont)
|
||||
{
|
||||
AutoScaleHorizontal = true,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public void HighlightRecipe(string identifier, Color color)
|
||||
|
||||
@@ -92,10 +92,10 @@ namespace Barotrauma.Items.Components
|
||||
switch (subElement.Name.ToString().ToLowerInvariant())
|
||||
{
|
||||
case "temperatureboostsoundup":
|
||||
temperatureBoostSoundUp = RoundSound.Load(subElement, false);
|
||||
temperatureBoostSoundUp = RoundSound.Load(subElement);
|
||||
break;
|
||||
case "temperatureboostsounddown":
|
||||
temperatureBoostSoundDown = RoundSound.Load(subElement, false);
|
||||
temperatureBoostSoundDown = RoundSound.Load(subElement);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1060,6 +1060,7 @@ namespace Barotrauma.Items.Components
|
||||
int missionIndex = 0;
|
||||
foreach (Mission mission in GameMain.GameSession.Missions)
|
||||
{
|
||||
if (!mission.Prefab.ShowSonarLabels) { continue; }
|
||||
int i = 0;
|
||||
foreach ((LocalizedString label, Vector2 position) in mission.SonarLabels)
|
||||
{
|
||||
@@ -1714,15 +1715,15 @@ namespace Barotrauma.Items.Components
|
||||
foreach (Structure structure in Structure.WallList)
|
||||
{
|
||||
if (structure.Submarine != sub) { continue; }
|
||||
CreateBlips(structure.IsHorizontal, structure.WorldPosition, structure.WorldRect);
|
||||
CreateBlips(structure.IsHorizontal, structure.WorldPosition, structure.WorldRect, -structure.RotationWithFlipping);
|
||||
}
|
||||
foreach (var door in Door.DoorList)
|
||||
{
|
||||
if (door.Item.Submarine != sub || door.IsOpen) { continue; }
|
||||
CreateBlips(door.IsHorizontal, door.Item.WorldPosition, door.Item.WorldRect, BlipType.Door);
|
||||
CreateBlips(door.IsHorizontal, door.Item.WorldPosition, door.Item.WorldRect, rotation: 0.0f, BlipType.Door);
|
||||
}
|
||||
|
||||
void CreateBlips(bool isHorizontal, Vector2 worldPos, Rectangle worldRect, BlipType blipType = BlipType.Default)
|
||||
void CreateBlips(bool isHorizontal, Vector2 worldPos, Rectangle worldRect, float rotation, BlipType blipType = BlipType.Default)
|
||||
{
|
||||
Vector2 point1, point2;
|
||||
if (isHorizontal)
|
||||
@@ -1735,6 +1736,14 @@ namespace Barotrauma.Items.Components
|
||||
point1 = new Vector2(worldPos.X, worldRect.Y);
|
||||
point2 = new Vector2(worldPos.X, worldRect.Y - worldRect.Height);
|
||||
}
|
||||
|
||||
if (!MathUtils.NearlyEqual(rotation, 0.0f))
|
||||
{
|
||||
float rotationRad = MathHelper.ToRadians(rotation);
|
||||
point1 = MathUtils.RotatePointAroundTarget(point1, worldPos, rotationRad);
|
||||
point2 = MathUtils.RotatePointAroundTarget(point2, worldPos, rotationRad);
|
||||
}
|
||||
|
||||
CreateBlipsForLine(
|
||||
point1,
|
||||
point2,
|
||||
|
||||
@@ -973,6 +973,7 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
PosToMaintain += nudgeAmount;
|
||||
}
|
||||
unsentChanges = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user