Fixed Steering components never setting their currPowerConsumption field above zero, making them cause zero load on the electrical grid.
This commit is contained in:
@@ -90,7 +90,7 @@ namespace Barotrauma.Items.Components
|
|||||||
|
|
||||||
GuiFrame.Draw(spriteBatch);
|
GuiFrame.Draw(spriteBatch);
|
||||||
|
|
||||||
if (voltage < minVoltage && powerConsumption > 0.0f) return;
|
if (voltage < minVoltage && currPowerConsumption > 0.0f) return;
|
||||||
|
|
||||||
Rectangle velRect = new Rectangle(x + 20, y + 20, width - 40, height - 40);
|
Rectangle velRect = new Rectangle(x + 20, y + 20, width - 40, height - 40);
|
||||||
//GUI.DrawRectangle(spriteBatch, velRect, Color.White, false);
|
//GUI.DrawRectangle(spriteBatch, velRect, Color.White, false);
|
||||||
@@ -137,6 +137,8 @@ namespace Barotrauma.Items.Components
|
|||||||
{
|
{
|
||||||
GuiFrame.Update(1.0f / 60.0f);
|
GuiFrame.Update(1.0f / 60.0f);
|
||||||
|
|
||||||
|
if (voltage < minVoltage && currPowerConsumption > 0.0f) return;
|
||||||
|
|
||||||
if (Vector2.Distance(PlayerInput.MousePosition, new Vector2(GuiFrame.Rect.Center.X, GuiFrame.Rect.Center.Y)) < 200.0f)
|
if (Vector2.Distance(PlayerInput.MousePosition, new Vector2(GuiFrame.Rect.Center.X, GuiFrame.Rect.Center.Y)) < 200.0f)
|
||||||
{
|
{
|
||||||
if (PlayerInput.LeftButtonHeld())
|
if (PlayerInput.LeftButtonHeld())
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ namespace Barotrauma.Items.Components
|
|||||||
: base(item, element)
|
: base(item, element)
|
||||||
{
|
{
|
||||||
IsActive = true;
|
IsActive = true;
|
||||||
|
|
||||||
InitProjSpecific();
|
InitProjSpecific();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,7 +128,9 @@ namespace Barotrauma.Items.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (voltage < minVoltage && powerConsumption > 0.0f) return;
|
currPowerConsumption = powerConsumption;
|
||||||
|
|
||||||
|
if (voltage < minVoltage && currPowerConsumption > 0.0f) return;
|
||||||
|
|
||||||
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
|
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user