Unstable 0.17.0.0

This commit is contained in:
Markus Isberg
2022-02-26 02:43:01 +09:00
parent a83f375681
commit 3974067915
913 changed files with 32472 additions and 32364 deletions
@@ -10,7 +10,7 @@ namespace Barotrauma.Items.Components
public Sonar ConnectedSonar;
public SonarTransducer(Item item, XElement element) : base(item, element)
public SonarTransducer(Item item, ContentXElement element) : base(item, element)
{
IsActive = true;
}
@@ -19,8 +19,6 @@ namespace Barotrauma.Items.Components
{
UpdateOnActiveEffects(deltaTime);
CurrPowerConsumption = powerConsumption * (ConnectedSonar?.CurrentMode == Sonar.Mode.Active ? 1.0f : Sonar.PassivePowerConsumption);
if (Voltage >= MinVoltage)
{
sendSignalTimer += deltaTime;
@@ -31,5 +29,15 @@ namespace Barotrauma.Items.Components
}
}
}
public override float GetCurrentPowerConsumption(Connection connection = null)
{
if (connection != powerIn || !IsActive)
{
return 0;
}
return PowerConsumption * (ConnectedSonar?.CurrentMode == Sonar.Mode.Active ? 1.0f : Sonar.PassivePowerConsumption);
}
}
}