(965c31410) v0.10.4.0

This commit is contained in:
Joonas Rikkonen
2020-07-30 13:00:09 +03:00
parent eeac247a8e
commit 4978af3d60
539 changed files with 45803 additions and 25359 deletions

View File

@@ -292,7 +292,7 @@ namespace Barotrauma
public void AddCustomContent(GUIComponent component, int childIndex)
{
component.RectTransform.Parent = layoutGroup.RectTransform;
component.RectTransform.RepositionChildInHierarchy(childIndex);
component.RectTransform.RepositionChildInHierarchy(Math.Min(childIndex, layoutGroup.CountChildren - 1));
layoutGroup.Recalculate();
Recalculate();
}
@@ -309,7 +309,21 @@ namespace Barotrauma
string propertyTag = (entity.GetType().Name + "." + property.PropertyInfo.Name).ToLowerInvariant();
string fallbackTag = property.PropertyInfo.Name.ToLowerInvariant();
string displayName = TextManager.Get($"sp.{propertyTag}.name", true, $"sp.{fallbackTag}.name");
string displayName =
TextManager.Get($"{propertyTag}", true, useEnglishAsFallBack: false) ??
TextManager.Get($"sp.{propertyTag}.name", true, useEnglishAsFallBack: false);
if (string.IsNullOrEmpty(displayName))
{
Editable editable = property.GetAttribute<Editable>();
if (editable != null && !string.IsNullOrEmpty(editable.FallBackTextTag))
{
displayName = TextManager.Get(editable.FallBackTextTag, true);
}
else
{
displayName = TextManager.Get(fallbackTag, true);
}
}
if (displayName == null)
{