v1.2.6.0 (Winter Update)

This commit is contained in:
Regalis11
2023-12-14 16:11:27 +02:00
parent af8cc89fce
commit b91e85559d
375 changed files with 7771 additions and 2874 deletions
@@ -158,7 +158,8 @@ namespace Barotrauma.Items.Components
IndicatorStyle = GUIStyle.GetComponentStyle("ContainedStateIndicator." + ContainedStateIndicatorStyle);
if (ContainedStateIndicator != null || ContainedStateIndicatorEmpty != null)
{
DebugConsole.AddWarning($"Item \"{item.Name}\" defines both a contained state indicator style and a custom indicator sprite. Will use the custom sprite...");
DebugConsole.AddWarning($"Item \"{item.Name}\" defines both a contained state indicator style and a custom indicator sprite. Will use the custom sprite...",
contentPackage: item.Prefab.ContentPackage);
}
}
if (GuiFrame == null)
@@ -345,9 +346,9 @@ namespace Barotrauma.Items.Components
public bool KeepOpenWhenEquippedBy(Character character)
{
if (!character.CanAccessInventory(Inventory) ||
!KeepOpenWhenEquipped ||
!character.HasEquippedItem(Item))
if (!KeepOpenWhenEquipped ||
!character.HasEquippedItem(Item) ||
!character.CanAccessInventory(Inventory))
{
return false;
}
@@ -570,11 +571,13 @@ namespace Barotrauma.Items.Components
{
spriteRotation = contained.Rotation;
}
if ((item.body != null && item.body.Dir == -1) || item.FlippedX)
bool flipX = (item.body != null && item.body.Dir == -1) || item.FlippedX;
if (flipX)
{
spriteEffects |= MathUtils.NearlyEqual(spriteRotation % 180, 90.0f) ? SpriteEffects.FlipVertically : SpriteEffects.FlipHorizontally;
}
if (item.FlippedY)
bool flipY = item.FlippedY;
if (flipY)
{
spriteEffects |= MathUtils.NearlyEqual(spriteRotation % 180, 90.0f) ? SpriteEffects.FlipHorizontally : SpriteEffects.FlipVertically;
}
@@ -588,6 +591,7 @@ namespace Barotrauma.Items.Components
contained.Item.Scale,
spriteEffects,
depth: containedSpriteDepth);
contained.Item.DrawDecorativeSprites(spriteBatch, itemPos, flipX,flipY, (contained.Item.body == null ? 0.0f : contained.Item.body.DrawRotation), containedSpriteDepth);
foreach (ItemContainer ic in contained.Item.GetComponents<ItemContainer>())
{