- parameter for changing the output value of And/Or components when the input conditions aren't met - or components work properly now - a limited number of signals (100) can be queued in a delay component
23 lines
515 B
C#
23 lines
515 B
C#
using System.Xml.Linq;
|
|
|
|
namespace Barotrauma.Items.Components
|
|
{
|
|
class OxygenDetector : ItemComponent
|
|
{
|
|
public OxygenDetector(Item item, XElement element)
|
|
: base (item, element)
|
|
{
|
|
IsActive = true;
|
|
}
|
|
|
|
public override void Update(float deltaTime, Camera cam)
|
|
{
|
|
if (item.CurrentHull == null) return;
|
|
|
|
item.SendSignal(0, ((int)item.CurrentHull.OxygenPercentage).ToString(), "signal_out");
|
|
|
|
}
|
|
|
|
}
|
|
}
|