Skip to content

Commit

Permalink
more sim param defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
katycat5e committed Feb 16, 2022
1 parent 3436415 commit d3509ba
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
1 change: 0 additions & 1 deletion CCL_GameScripts/SimParamsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public abstract class SimParamsBase : MonoBehaviour
public LocoRequiredLicense RequiredLicense = LocoRequiredLicense.None;
public float MaxSpeed = 120f;
public float SandCapacity = 200f;
public float SandValveSpeed = 10f;
public float SandMaxFlow = 5f;

[Header("Physics Curves")]
Expand Down
7 changes: 7 additions & 0 deletions CCL_GameScripts/SimParamsDiesel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public class SimParamsDiesel : SimParamsBase

[Header("Other Equipment")]
public float AirCompressorRate = 0.8f;
public float SandValveSpeed = 10f;

public SimParamsDiesel()
{
Expand Down Expand Up @@ -81,6 +82,9 @@ public void ApplyDE6Defaults()
OilCapacity = 500;
OilConsumptionEngineRpm = 1;

AirCompressorRate = 0.8f;
SandValveSpeed = 10;

BrakePowerCurve =
new AnimationCurve(
new Keyframe(0, 0, 0.3512f, 0.3512f, 0.3333f, 0.1033f),
Expand Down Expand Up @@ -142,6 +146,9 @@ public void ApplyShunterDefaults()
OilCapacity = 100;
OilConsumptionEngineRpm = 0.3f;

AirCompressorRate = 0.8f;
SandValveSpeed = 10;

BrakePowerCurve =
new AnimationCurve(
new Keyframe(0, 0, 0.2744f, 0.2744f, 0.3333f, 0.0561f),
Expand Down
1 change: 1 addition & 0 deletions CCL_GameScripts/SimParamsSteam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public void ApplySH282Defaults()
InjectorMaxFlowLPS = 3000;

FuelType = SteamFuelType.Coal;
IsTankLoco = false;
BunkerWaterCapacity = 0;
BunkerFuelCapacity = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ protected virtual void SimulateSteam(float delta)
(boilerWater.value > 0) &&
(boilerPressure.value < boilerPressure.max * 0.999f))
{
float evaporatedWater = VAPOR_RATE * (temperature.value - SteamLocoSimulation.WATER_BOIL_TEMP) * delta;
float evaporatedWater = simParams.VaporizationRate * (temperature.value - SteamLocoSimulation.WATER_BOIL_TEMP) * delta;
boilerWater.AddNextValue(-evaporatedWater);
boilerPressure.AddNextValue(evaporatedWater * PRESSURE_CONST);
}
Expand Down

0 comments on commit d3509ba

Please sign in to comment.