(23ecb8f20) Fixed: Scaling past 1920x1080 for: Reactor UI, Submarine labels, loading tips, inventoryslot container status
This commit is contained in:
@@ -105,9 +105,6 @@ namespace Barotrauma
|
||||
{
|
||||
if (IsTakenBySomeone(targetItem))
|
||||
{
|
||||
#if DEBUG
|
||||
DebugConsole.NewMessage($"{character.Name}: Found an item, but it's equipped by someone else. Aborting.", Color.Yellow);
|
||||
#endif
|
||||
abandon = true;
|
||||
}
|
||||
else
|
||||
@@ -175,7 +172,7 @@ namespace Barotrauma
|
||||
if (targetItem == null)
|
||||
{
|
||||
#if DEBUG
|
||||
DebugConsole.NewMessage($"{character.Name}: Cannot find the item, because neither identifiers nor item is was defined.", Color.Red);
|
||||
DebugConsole.NewMessage($"{character.Name}: Cannot find the item, because neither identifiers nor item is was defined.");
|
||||
#endif
|
||||
abandon = true;
|
||||
}
|
||||
@@ -215,7 +212,7 @@ namespace Barotrauma
|
||||
if (currSearchIndex >= Item.ItemList.Count - 1 && targetItem == null)
|
||||
{
|
||||
#if DEBUG
|
||||
DebugConsole.NewMessage($"{character.Name}: Cannot find the item with the following identifier(s): {string.Join(", ", itemIdentifiers)}", Color.Red);
|
||||
DebugConsole.NewMessage($"{character.Name}: Cannot find the item with the following identifier(s): {string.Join(", ", itemIdentifiers)}");
|
||||
#endif
|
||||
abandon = true;
|
||||
}
|
||||
@@ -277,18 +274,18 @@ namespace Barotrauma
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool IsTakenBySomeone(Item item)
|
||||
public static bool IsTakenBySomeone(Item item)
|
||||
{
|
||||
//if the item is inside a character's inventory, don't steal it unless the character is dead
|
||||
if (item.ParentInventory is CharacterInventory)
|
||||
{
|
||||
if (item.ParentInventory.Owner is Character owner && owner != character && !owner.IsDead) { return true; }
|
||||
if (item.ParentInventory.Owner is Character owner && !owner.IsDead) { return true; }
|
||||
}
|
||||
//if the item is inside an item, which is inside a character's inventory, don't steal it unless the character is dead
|
||||
Item rootContainer = item.GetRootContainer();
|
||||
if (rootContainer != null && rootContainer.ParentInventory is CharacterInventory)
|
||||
{
|
||||
if (rootContainer.ParentInventory.Owner is Character owner && owner != character && !owner.IsDead) { return true; }
|
||||
if (rootContainer.ParentInventory.Owner is Character owner && !owner.IsDead) { return true; }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user