(1c5ce3fee) More descriptive error messages when publishing a Workshop item fails.

This commit is contained in:
Joonas Rikkonen
2019-06-15 19:44:13 +03:00
parent 6f3d9d7191
commit 03a7093486
45 changed files with 461 additions and 235 deletions
@@ -148,7 +148,14 @@ namespace Barotrauma
//find the parent GUIListBox highest in the hierarchy
for (int i = parentHierarchy.Count - 1; i >= 0; i--)
{
if (parentHierarchy[i].GUIComponent is GUIListBox) return parentHierarchy[i];
if (parentHierarchy[i].GUIComponent is GUIListBox)
{
if (parentHierarchy[i].Parent != null && parentHierarchy[i].Parent.GUIComponent != null)
{
return parentHierarchy[i].Parent;
}
return parentHierarchy[i];
}
}
//or just go with the direct parent if there are no listboxes in the hierarchy
parentHierarchy.Clear();