(aebb26541) Added localizable connection names to all items (TODO: display in the connection panel interface, load from prefab if the value is not present in a sub or ItemAssembly file)

This commit is contained in:
Joonas Rikkonen
2019-05-16 06:03:51 +03:00
parent 392040c29c
commit f259748910
18 changed files with 144 additions and 324 deletions
@@ -12,6 +12,7 @@ namespace Barotrauma.Items.Components
public const int MaxLinked = 5;
public readonly string Name;
public readonly string DisplayName;
private Wire[] wires;
public IEnumerable<Wire> Wires
@@ -81,6 +82,11 @@ namespace Barotrauma.Items.Components
IsOutput = (element.Name.ToString() == "output");
Name = element.GetAttributeString("name", (IsOutput) ? "output" : "input");
DisplayName = element.Attributes("displayname") == null ?
Name :
TextManager.GetServerMessage(element.GetAttributeString("displayname", Name));
IsPower = Name == "power_in" || Name == "power" || Name == "power_out";
effects = new List<StatusEffect>();