(edb24c37f) Fixed ItemComponents overwriting the Msg-tags ("ItemMsgPressSelect" etc) with the text fetched from the text xml, preventing the texts from being translated after the sub has been saved.

This commit is contained in:
Joonas Rikkonen
2019-03-28 12:36:11 +02:00
parent d7526934e6
commit a8222e429f
4 changed files with 31 additions and 17 deletions
@@ -1551,14 +1551,14 @@ namespace Barotrauma
foreach (ItemComponent ic in components)
{
if (string.IsNullOrEmpty(ic.Msg)) continue;
if (string.IsNullOrEmpty(ic.DisplayMsg)) continue;
if (!ic.CanBePicked && !ic.CanBeSelected) continue;
if (ic is Holdable holdable && !holdable.CanBeDeattached()) continue;
Color color = Color.Red;
if (ic.HasRequiredSkills(character) && ic.HasRequiredItems(character, false)) color = Color.Orange;
texts.Add(new ColoredText(ic.Msg, color, false));
texts.Add(new ColoredText(ic.DisplayMsg, color, false));
}
return texts;