Unstable 0.16.6.1

This commit is contained in:
Markus Isberg
2022-02-24 00:42:03 +09:00
parent e54cee163e
commit 102e089aa6
12 changed files with 28 additions and 14 deletions
@@ -1131,8 +1131,8 @@ namespace Barotrauma
case QuickUseAction.PutToEquippedItem:
foreach (Item heldItem in character.HeldItems)
{
if (heldItem.OwnInventory != null &&
heldItem.OwnInventory.TryPutItem(item, Character.Controlled) ||
if (heldItem.OwnInventory == null) { continue; }
if (heldItem.OwnInventory.TryPutItem(item, Character.Controlled) ||
(heldItem.OwnInventory.Capacity == 1 && heldItem.OwnInventory.TryPutItem(item, 0, allowSwapping: true, allowCombine: false, user: Character.Controlled)))
{
success = true;
@@ -1420,10 +1420,11 @@ namespace Barotrauma.Items.Components
Vector2 drawPos = new Vector2(frame.Rect.Right - sizeX, frame.Rect.Y - sizeY / 2f);
UISprite icon = GUI.Style.IconOverflowIndicator;
const int iconPadding = 4;
icon.Draw(spriteBatch, new Rectangle((int) drawPos.X - iconPadding, (int) drawPos.Y - iconPadding, (int) maxWidth + iconPadding * 2, (int) maxWidth + iconPadding * 2), Color.White, SpriteEffects.None);
if (icon != null)
{
const int iconPadding = 4;
icon.Draw(spriteBatch, new Rectangle((int) drawPos.X - iconPadding, (int) drawPos.Y - iconPadding, (int) maxWidth + iconPadding * 2, (int) maxWidth + iconPadding * 2), Color.White, SpriteEffects.None);
}
GUI.DrawString(spriteBatch, drawPos, text, GUI.Style.TextColor, font: GUI.SubHeadingFont);
}
break;