Unstable 0.16.0.0
This commit is contained in:
+15
-1
@@ -17,6 +17,12 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
}
|
||||
|
||||
[Editable, Serialize("", false)]
|
||||
public string Separator
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public ConcatComponent(Item item, XElement element)
|
||||
: base(item, element)
|
||||
@@ -25,7 +31,15 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
protected override string Calculate(string signal1, string signal2)
|
||||
{
|
||||
string output = signal1 + signal2;
|
||||
string output;
|
||||
if (string.IsNullOrEmpty(Separator))
|
||||
{
|
||||
output = signal1 + signal2;
|
||||
}
|
||||
else
|
||||
{
|
||||
output = signal1 + Separator + signal2;
|
||||
}
|
||||
return output.Length <= maxOutputLength ? output : output.Substring(0, MaxOutputLength);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user