Added battery recharge docks, moved applying OnActive statuseffects to the Powered itemcomponent, removed smoke particles from stun baton hit effect
This commit is contained in:
@@ -33,6 +33,8 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
|
||||
if (voltage < minVoltage) return;
|
||||
|
||||
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
|
||||
|
||||
if (powerConsumption == 0.0f) voltage = 1.0f;
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ namespace Barotrauma.Items.Components
|
||||
public override void Update(float deltaTime, Camera cam)
|
||||
{
|
||||
#if CLIENT
|
||||
if (progressBar!=null)
|
||||
if (progressBar != null)
|
||||
{
|
||||
progressBar.BarSize = fabricatedItem == null ? 0.0f : (fabricatedItem.RequiredTime - timeUntilReady) / fabricatedItem.RequiredTime;
|
||||
}
|
||||
@@ -217,6 +217,8 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
if (voltage < minVoltage) return;
|
||||
|
||||
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
|
||||
|
||||
if (powerConsumption == 0) voltage = 1.0f;
|
||||
|
||||
timeUntilReady -= deltaTime*voltage;
|
||||
|
||||
@@ -62,6 +62,11 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
hasPower = voltage > minVoltage;
|
||||
|
||||
if (hasPower)
|
||||
{
|
||||
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
|
||||
}
|
||||
|
||||
voltage = 0.0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,8 +64,6 @@ namespace Barotrauma.Items.Components
|
||||
powerDownTimer = 0.0f;
|
||||
}
|
||||
|
||||
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
|
||||
|
||||
running = true;
|
||||
|
||||
CurrFlow = Math.Min(voltage, 1.0f) * generatedAmount*100.0f;
|
||||
|
||||
@@ -186,16 +186,16 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
|
||||
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
|
||||
|
||||
|
||||
fissionRate = Math.Min(fissionRate, AvailableFuel);
|
||||
|
||||
float heat = 80 * fissionRate * (AvailableFuel/2000.0f);
|
||||
|
||||
float heat = 80 * fissionRate * (AvailableFuel / 2000.0f);
|
||||
float heatDissipation = 50 * coolingRate + Math.Max(ExtraCooling, 5.0f);
|
||||
|
||||
float deltaTemp = (((heat - heatDissipation) * 5) - temperature) / 10000.0f;
|
||||
Temperature = temperature + deltaTemp;
|
||||
|
||||
if (temperature>fireTemp && temperature-deltaTemp<fireTemp)
|
||||
if (temperature > fireTemp && temperature - deltaTemp < fireTemp)
|
||||
{
|
||||
#if CLIENT
|
||||
Vector2 baseVel = Rand.Vector(300.0f);
|
||||
|
||||
@@ -129,7 +129,9 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
|
||||
if (voltage < minVoltage && powerConsumption > 0.0f) return;
|
||||
|
||||
|
||||
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
|
||||
|
||||
if (autoPilot)
|
||||
{
|
||||
UpdateAutoPilot(deltaTime);
|
||||
@@ -138,12 +140,10 @@ namespace Barotrauma.Items.Components
|
||||
item.SendSignal(0, targetVelocity.X.ToString(CultureInfo.InvariantCulture), "velocity_x_out", null);
|
||||
|
||||
float targetLevel = -targetVelocity.Y;
|
||||
|
||||
targetLevel += (neutralBallastLevel - 0.5f) * 100.0f;
|
||||
|
||||
item.SendSignal(0, targetLevel.ToString(CultureInfo.InvariantCulture), "velocity_y_out", null);
|
||||
|
||||
|
||||
voltage -= deltaTime;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user