Unstable v0.1300.0.1
This commit is contained in:
@@ -4,7 +4,7 @@ using System.Xml.Linq;
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
class AndComponent : ItemComponent
|
||||
{
|
||||
{
|
||||
protected string output, falseOutput;
|
||||
|
||||
//an array to keep track of how long ago a non-zero signal was received on both inputs
|
||||
@@ -27,14 +27,41 @@ namespace Barotrauma.Items.Components
|
||||
public string Output
|
||||
{
|
||||
get { return output; }
|
||||
set { output = value; }
|
||||
set
|
||||
{
|
||||
if (value == null) { return; }
|
||||
output = value;
|
||||
if (output.Length > MaxOutputLength)
|
||||
{
|
||||
output = output.Substring(0, MaxOutputLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[InGameEditable, Serialize("", true, description: "The signal sent when the condition is met (if empty, no signal is sent).", alwaysUseInstanceValues: true)]
|
||||
public string FalseOutput
|
||||
{
|
||||
get { return falseOutput; }
|
||||
set { falseOutput = value; }
|
||||
set
|
||||
{
|
||||
if (value == null) { return; }
|
||||
falseOutput = value;
|
||||
if (falseOutput.Length > MaxOutputLength)
|
||||
{
|
||||
falseOutput = falseOutput.Substring(0, MaxOutputLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int maxOutputLength;
|
||||
[Editable, Serialize(200, false, description: "The maximum length of the output strings. Warning: Large values can lead to large memory usage or networking issues.")]
|
||||
public int MaxOutputLength
|
||||
{
|
||||
get { return maxOutputLength; }
|
||||
set
|
||||
{
|
||||
maxOutputLength = Math.Max(value, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public AndComponent(Item item, XElement element)
|
||||
|
||||
Reference in New Issue
Block a user