Moar progress, fixed shadow/los/submarine misalignment issues
This commit is contained in:
@@ -4,31 +4,17 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
class OxygenDetector : ItemComponent
|
||||
{
|
||||
private Hull hull;
|
||||
|
||||
public OxygenDetector(Item item, XElement element)
|
||||
: base (item, element)
|
||||
{
|
||||
hull = Hull.FindHull(item.Position);
|
||||
|
||||
IsActive = true;
|
||||
}
|
||||
|
||||
public override void OnMapLoaded()
|
||||
{
|
||||
hull = Hull.FindHull(item.Position);
|
||||
}
|
||||
|
||||
public override void Move(Microsoft.Xna.Framework.Vector2 amount)
|
||||
{
|
||||
hull = Hull.FindHull(item.Position);
|
||||
}
|
||||
|
||||
public override void Update(float deltaTime, Camera cam)
|
||||
{
|
||||
if (hull == null) return;
|
||||
|
||||
item.SendSignal(((int)hull.OxygenPercentage).ToString(), "signal_out");
|
||||
if (item.CurrentHull == null) return;
|
||||
|
||||
item.SendSignal(((int)item.CurrentHull.OxygenPercentage).ToString(), "signal_out");
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user