Unstable 0.16.1.0

This commit is contained in:
Markus Isberg
2022-01-27 00:30:32 +09:00
parent 7d6421a548
commit b259af5911
161 changed files with 1913 additions and 638 deletions
@@ -479,7 +479,17 @@ namespace Barotrauma
{
if (i < 0 || i >= slots.Length)
{
string errorMsg = $"Inventory.TryPutItem failed: index was out of range (item: {(item?.Name ?? "null")}, inventory: {(Owner?.ToString() ?? "null")}).\n" + Environment.StackTrace.CleanupStackTrace();
string thisItemStr = item?.prefab.Identifier ?? "null";
string ownerStr = "null";
if (Owner is Item ownerItem)
{
ownerStr = ownerItem.prefab.Identifier;
}
else if (Owner is Character ownerCharacter)
{
ownerStr = ownerCharacter.SpeciesName;
}
string errorMsg = $"Inventory.TryPutItem failed: index was out of range (item: {thisItemStr}, inventory: {ownerStr}).";
GameAnalyticsManager.AddErrorEventOnce("Inventory.TryPutItem:IndexOutOfRange", GameAnalyticsManager.ErrorSeverity.Error, errorMsg);
#if DEBUG
DebugConsole.ThrowError(errorMsg);