Add manual port pilotage and working bridge instruments
Scale docking momentum by hull, require manual mooring and channel maneuvers in Captain Career, and add rank-specific bridge instruments and voiced training.
This commit is contained in:
@@ -55,12 +55,7 @@ namespace BigShipTycoon
|
||||
return;
|
||||
|
||||
// Simulated X/Y use nominal route seconds. The route duration already includes the sea-state penalty.
|
||||
float cruising = cruiseKnots / (weather switch
|
||||
{
|
||||
WeatherCondition.Swell => 1.14f,
|
||||
WeatherCondition.Storm => 1.32f,
|
||||
_ => 1f
|
||||
});
|
||||
float cruising = cruiseKnots / WeatherSlowdown(weather);
|
||||
float targetSpeed = PropulsionStopped ? 0 : cruising * Mathf.Max(0, engineSpeedFactor);
|
||||
float requestedRudder = Mathf.Clamp(rudderInput, -1f, 1f) * RudderLimit;
|
||||
if (Manual)
|
||||
@@ -122,6 +117,21 @@ namespace BigShipTycoon
|
||||
return Mathf.Clamp(courseError * 1.55f - turnRate * 3.6f, -RudderLimit, RudderLimit);
|
||||
}
|
||||
|
||||
internal void TakeDepartureSpeed(float speedKnots)
|
||||
{
|
||||
Manual = PropulsionStopped = false;
|
||||
Speed = Mathf.Clamp(speedKnots, 0, cruiseKnots);
|
||||
}
|
||||
|
||||
internal float HarborApproachFactor(float cruiseFactor, WeatherCondition weather)
|
||||
{
|
||||
float approachFactor = Mathf.Min(cruiseFactor, 4.3f * WeatherSlowdown(weather) / cruiseKnots);
|
||||
return Mathf.Lerp(cruiseFactor, approachFactor, Mathf.SmoothStep(0, 1, Mathf.InverseLerp(.84f, .99f, Progress)));
|
||||
}
|
||||
|
||||
private static float WeatherSlowdown(WeatherCondition weather) =>
|
||||
weather switch { WeatherCondition.Swell => 1.14f, WeatherCondition.Storm => 1.32f, _ => 1f };
|
||||
|
||||
internal void SetProgress(float progress)
|
||||
{
|
||||
Progress = Mathf.Clamp01(progress);
|
||||
|
||||
Reference in New Issue
Block a user