(5d39bdb07) Disabled reactors cooling down when underwater. If we want to include this, we need to explain to the player that they may need extra fuel to keep the reactor running when the reactor room is flooded.

This commit is contained in:
Joonas Rikkonen
2019-03-28 12:35:15 +02:00
parent 72e7cb6e99
commit 9849e76f76

View File

@@ -212,7 +212,7 @@ namespace Barotrauma.Items.Components
float heatAmount = fissionRate * (AvailableFuel / 100.0f) * 2.0f;
float temperatureDiff = (heatAmount - turbineOutput) - Temperature;
Temperature += MathHelper.Clamp(Math.Sign(temperatureDiff) * 10.0f * deltaTime, -Math.Abs(temperatureDiff), Math.Abs(temperatureDiff));
if (item.InWater && AvailableFuel < 100.0f) Temperature -= 12.0f * deltaTime;
//if (item.InWater && AvailableFuel < 100.0f) Temperature -= 12.0f * deltaTime;
FissionRate = MathHelper.Lerp(fissionRate, Math.Min(targetFissionRate, AvailableFuel), deltaTime);
TurbineOutput = MathHelper.Lerp(turbineOutput, targetTurbineOutput, deltaTime);