(6e187d247) Fixed contained items' status effects being added twice to the list of an ItemContainer's active status effects when swapping items. For example, when swapping a fuel rod with another one, the status effect that increases AvailableFuel would be applied twice, causing the reactor to act as if there were 2 rods in it. Closes #1643 + merge fix

This commit is contained in:
Joonas Rikkonen
2019-06-15 20:24:01 +03:00
parent f68c16d944
commit 87a0ee21eb
52 changed files with 497 additions and 983 deletions
@@ -378,8 +378,6 @@ namespace Barotrauma
Thread.Sleep(250);
}
}
return true;
}
@@ -470,7 +468,20 @@ namespace Barotrauma
foreach (DirectoryInfo di in dir.GetDirectories())
{
ClearFolder(di.FullName, ignoredFileNames);
di.Delete();
int maxRetries = 4;
for (int i = 0; i <= maxRetries; i++)
{
try
{
di.Delete();
break;
}
catch (IOException)
{
if (i >= maxRetries) { throw; }
Thread.Sleep(250);
}
}
}
}
}