Release 1.9.7.0 - Summer Update 2025

This commit is contained in:
Regalis11
2025-06-17 16:38:11 +03:00
parent 22227f13e5
commit ea5a2bc693
297 changed files with 7344 additions and 2421 deletions
@@ -357,6 +357,18 @@ namespace Barotrauma
#if DEBUG
toolTip += $" ({item.Prefab.Identifier})";
#endif
if (!item.Prefab.UnlockedRecipeInToolTip.IsEmpty && GameMain.GameSession is { } GameSession)
{
if (GameSession.UnlockedRecipes.Contains(item.Prefab.UnlockedRecipeInToolTip))
{
toolTip += TextManager.Get("unlockedrecipe.true");
}
else
{
toolTip += $"\n‖color:{XMLExtensions.ToStringHex(GUIStyle.Yellow)}‖{TextManager.Get("unlockedrecipe.false")}‖color:end‖";
}
}
if (PlayerInput.KeyDown(InputType.ContextualCommand))
{
toolTip += $"\n‖color:gui.blue‖{TextManager.ParseInputTypes(TextManager.Get("itemmsgcontextualorders"))}‖color:end‖";
@@ -365,7 +377,8 @@ namespace Barotrauma
{
var colorStr = XMLExtensions.ToStringHex(Color.LightGray * 0.7f);
toolTip += $"\n‖color:{colorStr}‖{TextManager.Get("itemmsg.morreoptionsavailable")}‖color:end‖";
}
}
return RichString.Rich(toolTip);
}
@@ -425,9 +438,9 @@ namespace Barotrauma
}
}
public Inventory GetReplacementOrThiS()
public Inventory GetReplacementOrThis()
{
return ReplacedBy?.GetReplacementOrThiS() ?? this;
return ReplacedBy?.GetReplacementOrThis() ?? this;
}
public virtual void CreateSlots()
@@ -1255,7 +1268,7 @@ namespace Barotrauma
container.AllowDragAndDrop &&
inventory.CanBePut(DraggingItems.FirstOrDefault());
bool isTargetingValidCharacter = IsValidTargetForDragDropGive(Character.Controlled, Character.Controlled.FocusedCharacter);
bool isTargetingValidCharacter = IsValidTargetForDragDropGive(Character.Controlled, Character.Controlled.FocusedCharacter, DraggingItems);
if (DraggingItemToWorld && (isTargetingValidContainer || isTargetingValidCharacter))
{
@@ -1418,11 +1431,13 @@ namespace Barotrauma
}
}
private static bool IsValidTargetForDragDropGive(Character giver, Character receiver)
private static bool IsValidTargetForDragDropGive(Character giver, Character receiver, IEnumerable<Item> draggedItems)
{
if (giver == null || receiver == null) { return false; }
if (giver == null || receiver == null || draggedItems.None()) { return false; }
if (receiver == giver) { return false; }
return receiver.IsInventoryAccessibleTo(giver, IsDragAndDropGiveAllowed ? CharacterInventory.AccessLevel.Allowed : CharacterInventory.AccessLevel.Limited);
return
receiver.IsInventoryAccessibleTo(giver, IsDragAndDropGiveAllowed ? CharacterInventory.AccessLevel.Allowed : CharacterInventory.AccessLevel.Limited) &&
receiver.Inventory.CanBePut(draggedItems.FirstOrDefault(), InvSlotType.Any);
}
private static bool CanSelectSlot(SlotReference selectedSlot)
@@ -1651,7 +1666,7 @@ namespace Barotrauma
(LocalizedString, Color) GetDragLabelTextAndColor(bool mouseOnHealthInterface)
{
bool useDragDropGive = IsValidTargetForDragDropGive(Character.Controlled, Character.Controlled.FocusedCharacter);
bool useDragDropGive = IsValidTargetForDragDropGive(Character.Controlled, Character.Controlled.FocusedCharacter, DraggingItems);
Color toolTipColor = Color.LightGreen;