(df244251c) Fixed: Electric devices that are underwater and are broken by flooding being repairable forever, due to condition never staying at full condition for long enough for the repairing to stop
This commit is contained in:
@@ -378,6 +378,8 @@ namespace Barotrauma
|
||||
Thread.Sleep(250);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -468,20 +470,7 @@ namespace Barotrauma
|
||||
foreach (DirectoryInfo di in dir.GetDirectories())
|
||||
{
|
||||
ClearFolder(di.FullName, ignoredFileNames);
|
||||
int maxRetries = 4;
|
||||
for (int i = 0; i <= maxRetries; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
di.Delete();
|
||||
break;
|
||||
}
|
||||
catch (IOException)
|
||||
{
|
||||
if (i >= maxRetries) { throw; }
|
||||
Thread.Sleep(250);
|
||||
}
|
||||
}
|
||||
di.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user