Unstable v0.1300.0.1
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Xml.Linq;
|
||||
using System;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
@@ -9,11 +10,48 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
private bool fireInRange;
|
||||
|
||||
[InGameEditable, Serialize("1", true, description: "The signal the item outputs when it has detected movement.", alwaysUseInstanceValues: true)]
|
||||
public string Output { get; set; }
|
||||
private string output;
|
||||
[InGameEditable, Serialize("1", true, description: "The signal the item outputs when it has detected a fire.", alwaysUseInstanceValues: true)]
|
||||
public string Output
|
||||
{
|
||||
get { return output; }
|
||||
set
|
||||
{
|
||||
if (value == null) { return; }
|
||||
output = value;
|
||||
if (output.Length > MaxOutputLength)
|
||||
{
|
||||
output = output.Substring(0, MaxOutputLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[InGameEditable, Serialize("0", true, description: "The signal the item outputs when it has not detected movement.", alwaysUseInstanceValues: true)]
|
||||
public string FalseOutput { get; set; }
|
||||
private string falseOutput;
|
||||
[InGameEditable, Serialize("0", true, description: "The signal the item outputs when it has not detected a fire.", alwaysUseInstanceValues: true)]
|
||||
public string FalseOutput
|
||||
{
|
||||
get { return falseOutput; }
|
||||
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 SmokeDetector(Item item, XElement element)
|
||||
: base(item, element)
|
||||
|
||||
Reference in New Issue
Block a user