Fixed errors in netlobbyscreen when attempting to select a sub that fails to load (for example due to a missing/corrupt file), campaign cannot be started if the selected submarine cannot be loaded
This commit is contained in:
@@ -737,10 +737,11 @@ namespace Barotrauma
|
||||
//hash will be null if opening the sub file failed -> don't select the sub
|
||||
if (string.IsNullOrWhiteSpace(hash))
|
||||
{
|
||||
if (component is GUITextBlock textBlock)
|
||||
GUITextBlock submarineTextBlock = component.GetChild<GUITextBlock>();
|
||||
if (submarineTextBlock != null)
|
||||
{
|
||||
textBlock.TextColor = Color.DarkRed * 0.8f;
|
||||
textBlock.CanBeFocused = false;
|
||||
submarineTextBlock.TextColor = Color.DarkRed * 0.8f;
|
||||
submarineTextBlock.CanBeFocused = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user