diff --git a/Assets/Soundings/Editor/EconomyVerification.cs b/Assets/Soundings/Editor/EconomyVerification.cs index 11601c4..f37270e 100644 --- a/Assets/Soundings/Editor/EconomyVerification.cs +++ b/Assets/Soundings/Editor/EconomyVerification.cs @@ -14,7 +14,8 @@ namespace Soundings.Editor VerifyLiveCrossingSettlement(); VerifyStormAndShipSystems(); VerifyPortOrders(); - Debug.Log("Soundings economy verification passed: both starts, pricing, fuel, accounting, saves, flagship progression, live settlement, weather, ship systems and port orders."); + VerifyMultiStopItinerary(); + Debug.Log("Soundings economy verification passed: both starts, pricing, fuel, accounting, saves, flagship progression, live settlement, weather, ship systems, port orders and multi-stop itineraries."); } private static void VerifyUsedStartAndProfit() @@ -258,6 +259,37 @@ namespace Soundings.Editor && loaded.History[0].Plan.Program == EntertainmentProgram.LiveMusic, "dockside orders survive a saved arrival"); } + private static void VerifyMultiStopItinerary() + { + Company company = Company.Start(false); + Ship ship = company.ActiveShip; + Require(company.AppendItineraryStop(ship, 0) != null, "an itinerary cannot repeat the current berth in consecutive calls"); + Require(company.AppendItineraryStop(ship, 1) == null, "add Nassau to a Miami itinerary"); + Require(company.AppendItineraryStop(ship, 2) != null, "a later call also needs its permit"); + Require(company.Permit(2) == null && company.AppendItineraryStop(ship, 2) == null, "add Key West after licensing it"); + Require(company.AppendItineraryStop(ship, Market.Lisbon) != null, "reject a disconnected leg"); + Require(company.Sail(ship, 2) != null && ship.Port == 0, "an active itinerary enforces its next call"); + + Voyage first = company.Forecast(ship, 1); + var session = new OnboardSession(ship, first); + Require(company.Sail(ship, 1, session) == null && ship.Itinerary.NextPort == 2 && ship.Port == 1, + "settling one leg leaves the ship at its intermediate port"); + int start = company.History[0].ItineraryStartDay; + Require(company.History[0].ItineraryLeg == 1 && company.History[0].ItineraryLegs == 2, "record first leg in the voyage ledger"); + + Company resumed = JsonUtility.FromJson(JsonUtility.ToJson(company)); + Require(resumed.CanLoad() && resumed.ActiveShip.Itinerary.NextPort == 2, "persist the next leg at an intermediate call"); + ship = resumed.ActiveShip; + Voyage second = resumed.Forecast(ship, 2); + int needed = Math.Max(0, second.RequiredFuel - ship.Fuel); + if (needed > 0) + Require(resumed.Refuel(ship, needed) == null, "bunker from the intermediate port"); + Require(resumed.Sail(ship, 2) == null && ship.Itinerary.CompletedStops == 2 && !ship.Itinerary.HasNext, + "arriving at the last call completes the itinerary"); + Require(resumed.History[0].ItineraryStartDay == start && resumed.History[0].ItineraryLeg == 2 + && resumed.History[1].Destination == 1 && resumed.History[0].Destination == 2, "group settled legs in order"); + } + private static void Require(bool condition, string description) { if (!condition) diff --git a/Assets/Soundings/Editor/SoundingsBuild.cs b/Assets/Soundings/Editor/SoundingsBuild.cs index 384b4c8..ecd3a10 100644 --- a/Assets/Soundings/Editor/SoundingsBuild.cs +++ b/Assets/Soundings/Editor/SoundingsBuild.cs @@ -24,7 +24,7 @@ namespace Soundings.Editor EditorBuildSettings.scenes = new[] { new EditorBuildSettingsScene(ScenePath, true) }; PlayerSettings.companyName = "Soundings"; PlayerSettings.productName = "Soundings"; - PlayerSettings.bundleVersion = "0.5.0"; + PlayerSettings.bundleVersion = "0.6.0"; PlayerSettings.defaultScreenWidth = 1920; PlayerSettings.defaultScreenHeight = 1080; PlayerSettings.fullScreenMode = FullScreenMode.FullScreenWindow; diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort00.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort00.wav new file mode 100644 index 0000000..31646b7 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort00.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort00.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort00.wav.meta new file mode 100644 index 0000000..c3faa7a --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort00.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 623a79925ffc481eebbdc50b4427e27c +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort01.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort01.wav new file mode 100644 index 0000000..77fb462 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort01.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort01.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort01.wav.meta new file mode 100644 index 0000000..0aea1fb --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort01.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 417743350e1e80494bf59d2c979a1d67 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort02.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort02.wav new file mode 100644 index 0000000..c3c7f2f Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort02.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort02.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort02.wav.meta new file mode 100644 index 0000000..144ba36 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort02.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 06cfda684ba0975509fd15d526f2036a +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort03.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort03.wav new file mode 100644 index 0000000..1b31c97 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort03.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort03.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort03.wav.meta new file mode 100644 index 0000000..a87f590 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort03.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 839879f44d60622df9cea51096896362 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort04.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort04.wav new file mode 100644 index 0000000..1030f73 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort04.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort04.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort04.wav.meta new file mode 100644 index 0000000..3fdb330 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort04.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: edb0b15df07a9e739bf8501e066b2637 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort05.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort05.wav new file mode 100644 index 0000000..564859d Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort05.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort05.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort05.wav.meta new file mode 100644 index 0000000..e9955bb --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort05.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 9260a2e7c370184029a3639c2e4418fa +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort06.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort06.wav new file mode 100644 index 0000000..896b416 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort06.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort06.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort06.wav.meta new file mode 100644 index 0000000..a94c4e7 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort06.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 57404b1889b400d80861e95f58afd905 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort07.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort07.wav new file mode 100644 index 0000000..f34e825 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort07.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort07.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort07.wav.meta new file mode 100644 index 0000000..eee1f68 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort07.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: f4bcb21797218fef0b137dbfd15b1244 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort08.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort08.wav new file mode 100644 index 0000000..d818e3d Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort08.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort08.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort08.wav.meta new file mode 100644 index 0000000..9dd53d9 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort08.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 56f7f7b69a3ca255d8626371b20f6fe5 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort09.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort09.wav new file mode 100644 index 0000000..165fed1 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort09.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort09.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort09.wav.meta new file mode 100644 index 0000000..8990a5a --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort09.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 7c822eec93d86ddc088d27b6daa0ce28 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort10.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort10.wav new file mode 100644 index 0000000..1a9d961 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort10.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort10.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort10.wav.meta new file mode 100644 index 0000000..21c7d42 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort10.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 72ea79d59ef51542bb33c19d713f74b3 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort11.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort11.wav new file mode 100644 index 0000000..2e8c7ea Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort11.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort11.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort11.wav.meta new file mode 100644 index 0000000..3676e67 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort11.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: ec4814bd856214570a04afd430dd1294 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort12.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort12.wav new file mode 100644 index 0000000..178764c Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort12.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort12.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort12.wav.meta new file mode 100644 index 0000000..28bb8fe --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort12.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: d17419e9171ce92e2806cfd7bf3627a3 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort13.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort13.wav new file mode 100644 index 0000000..286383b Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort13.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort13.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort13.wav.meta new file mode 100644 index 0000000..2e1a8cd --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort13.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 7026fce26ebbe4a3d943824a896fced0 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort14.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort14.wav new file mode 100644 index 0000000..bad0fbb Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort14.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort14.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort14.wav.meta new file mode 100644 index 0000000..a6cb404 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort14.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 8727668591368b71fa737d2fb9745e89 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort15.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort15.wav new file mode 100644 index 0000000..021f8b9 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort15.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort15.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort15.wav.meta new file mode 100644 index 0000000..4e6e26e --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort15.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: d431b73f0960f072191282c60da634ed +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort16.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort16.wav new file mode 100644 index 0000000..fc5ce7c Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort16.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort16.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort16.wav.meta new file mode 100644 index 0000000..dc1d89e --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort16.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: e2be985f9884deaaca6d2e78ae932324 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort17.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort17.wav new file mode 100644 index 0000000..11eebb1 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort17.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort17.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort17.wav.meta new file mode 100644 index 0000000..a315c72 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort17.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 91a7858fb9cc138378e23f9aabfadda7 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort18.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort18.wav new file mode 100644 index 0000000..09bf7cd Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort18.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort18.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort18.wav.meta new file mode 100644 index 0000000..eb1b7b4 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort18.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: a4a9e6148e3dd87f8885e37ca2f99005 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort19.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort19.wav new file mode 100644 index 0000000..d063ce9 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort19.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort19.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort19.wav.meta new file mode 100644 index 0000000..87e7ae7 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort19.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: ba3e085606e6b0cf1b790c9cc21bc25d +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort20.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort20.wav new file mode 100644 index 0000000..1c9126b Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort20.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort20.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort20.wav.meta new file mode 100644 index 0000000..78eda5e --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort20.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 99d83d7bd6d8c00128feebdd8c08bad6 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort21.wav b/Assets/Soundings/Resources/Audio/PA/ApproachPort21.wav new file mode 100644 index 0000000..e4a3117 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/ApproachPort21.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/ApproachPort21.wav.meta b/Assets/Soundings/Resources/Audio/PA/ApproachPort21.wav.meta new file mode 100644 index 0000000..1faa5b0 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/ApproachPort21.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 1a77f364eedfc223696c4c816c8a8592 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/Attribution.txt b/Assets/Soundings/Resources/Audio/PA/Attribution.txt index a10731f..a57008c 100644 --- a/Assets/Soundings/Resources/Audio/PA/Attribution.txt +++ b/Assets/Soundings/Resources/Audio/PA/Attribution.txt @@ -5,3 +5,5 @@ https://huggingface.co/hexgrad/Kokoro-82M The audio was generated with kokoro-onnx 0.6.0. https://github.com/thewh1teagle/kokoro-onnx + +The DeparturePort and ApproachPort recordings follow the zero-based order of Market.Ports. Each recording includes the complete announcement and its destination in the same voice as the other shipboard cues. diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort00.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort00.wav new file mode 100644 index 0000000..a69727f Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort00.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort00.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort00.wav.meta new file mode 100644 index 0000000..2d4f890 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort00.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 33057649cdc01f1c2809d3ffbf90fc31 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort01.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort01.wav new file mode 100644 index 0000000..2b8e753 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort01.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort01.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort01.wav.meta new file mode 100644 index 0000000..458c036 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort01.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 975278db9f94954f0b865f7e4652e1c8 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort02.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort02.wav new file mode 100644 index 0000000..88278a2 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort02.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort02.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort02.wav.meta new file mode 100644 index 0000000..fae490c --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort02.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 37576380d03ee16369db2ea7ba28aa70 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort03.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort03.wav new file mode 100644 index 0000000..45b3975 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort03.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort03.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort03.wav.meta new file mode 100644 index 0000000..11cee20 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort03.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 0c2fc8cb7d86b4d75a46a2211d306c14 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort04.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort04.wav new file mode 100644 index 0000000..c3fabb3 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort04.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort04.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort04.wav.meta new file mode 100644 index 0000000..1914009 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort04.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: bd3e70a9c9d2c2cb0bb706df64739cc8 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort05.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort05.wav new file mode 100644 index 0000000..5e9ebee Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort05.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort05.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort05.wav.meta new file mode 100644 index 0000000..daa58e2 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort05.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: f340579204c88e4f694dbaa0281ad1fc +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort06.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort06.wav new file mode 100644 index 0000000..fc92592 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort06.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort06.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort06.wav.meta new file mode 100644 index 0000000..569b06b --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort06.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 2a018ce47bf12fefb9b69aaadfeda988 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort07.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort07.wav new file mode 100644 index 0000000..c7f3cf9 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort07.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort07.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort07.wav.meta new file mode 100644 index 0000000..0a19291 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort07.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: c4289d6878a38b8e8b16ca9064b3f975 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort08.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort08.wav new file mode 100644 index 0000000..7d089e5 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort08.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort08.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort08.wav.meta new file mode 100644 index 0000000..36aa92d --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort08.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: b181e1d1d357b543fa3709e50363b70f +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort09.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort09.wav new file mode 100644 index 0000000..8edcddf Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort09.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort09.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort09.wav.meta new file mode 100644 index 0000000..1c4b1ef --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort09.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 4e6384d1dea5552f382458f257b36660 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort10.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort10.wav new file mode 100644 index 0000000..5b51923 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort10.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort10.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort10.wav.meta new file mode 100644 index 0000000..f449196 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort10.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: b42d5ca5cc96f120696af8701c885003 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort11.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort11.wav new file mode 100644 index 0000000..9fb662c Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort11.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort11.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort11.wav.meta new file mode 100644 index 0000000..b3d3490 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort11.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 003562441430e8db0bbbd47c890621bd +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort12.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort12.wav new file mode 100644 index 0000000..6116696 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort12.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort12.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort12.wav.meta new file mode 100644 index 0000000..0658b12 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort12.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 9a69adda85c1380638fbdbacc2013e28 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort13.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort13.wav new file mode 100644 index 0000000..1df141b Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort13.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort13.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort13.wav.meta new file mode 100644 index 0000000..bc2acda --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort13.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 701b5fbfdf31ce384a3ec84a9a5e47e3 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort14.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort14.wav new file mode 100644 index 0000000..3fb9989 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort14.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort14.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort14.wav.meta new file mode 100644 index 0000000..4964b93 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort14.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 9e61f5864e39fcb8ab6db984d2b2b51d +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort15.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort15.wav new file mode 100644 index 0000000..ad1b1ca Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort15.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort15.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort15.wav.meta new file mode 100644 index 0000000..f8a49f1 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort15.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 1b7832142cc6486bea65830274312382 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort16.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort16.wav new file mode 100644 index 0000000..1b48ffb Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort16.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort16.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort16.wav.meta new file mode 100644 index 0000000..fff47b4 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort16.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: ff701757fe79600e7a42d6206c7ad7ab +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort17.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort17.wav new file mode 100644 index 0000000..04178c0 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort17.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort17.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort17.wav.meta new file mode 100644 index 0000000..21aafd6 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort17.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 9810ec7407f53a39fbb1288feb0d69fa +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort18.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort18.wav new file mode 100644 index 0000000..9adf9a1 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort18.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort18.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort18.wav.meta new file mode 100644 index 0000000..517c7ca --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort18.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: c8e43689f2ad2b115866709fbba4d00e +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort19.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort19.wav new file mode 100644 index 0000000..ea7a5a0 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort19.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort19.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort19.wav.meta new file mode 100644 index 0000000..76789a9 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort19.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 81f689266c2ac75e2a7c9872af90b5da +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort20.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort20.wav new file mode 100644 index 0000000..078acd4 Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort20.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort20.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort20.wav.meta new file mode 100644 index 0000000..ca9d1db --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort20.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 6e35a1c013aa07c0a8cc9a56cdd08c01 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort21.wav b/Assets/Soundings/Resources/Audio/PA/DeparturePort21.wav new file mode 100644 index 0000000..91455cc Binary files /dev/null and b/Assets/Soundings/Resources/Audio/PA/DeparturePort21.wav differ diff --git a/Assets/Soundings/Resources/Audio/PA/DeparturePort21.wav.meta b/Assets/Soundings/Resources/Audio/PA/DeparturePort21.wav.meta new file mode 100644 index 0000000..fc86285 --- /dev/null +++ b/Assets/Soundings/Resources/Audio/PA/DeparturePort21.wav.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 049e39ec183fb3740bcabdc6a1aed2c3 +AudioImporter: + externalObjects: {} + serializedVersion: 8 + defaultSettings: + serializedVersion: 2 + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + preloadAudioData: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Soundings/Resources/Chart.uss b/Assets/Soundings/Resources/Chart.uss index 7860546..bc5178f 100644 --- a/Assets/Soundings/Resources/Chart.uss +++ b/Assets/Soundings/Resources/Chart.uss @@ -580,3 +580,120 @@ font-size: 24px; margin-left: 10px; } + +.chart-itinerary-header, +.chart-itinerary-next, +.chart-itinerary-row, +.chart-itinerary-controls, +.chart-itinerary-connections { + flex-direction: row; + align-items: center; +} + +.chart-itinerary-header, +.chart-itinerary-next { + justify-content: space-between; +} + +.chart-itinerary-title { + color: #243942; + font-size: 34px; +} + +.chart-itinerary-review { + margin-top: 6px; +} + +.chart-itinerary-next { + background-color: rgba(125, 100, 56, .12); + padding: 4px 7px; + margin-top: 7px; + border-left-width: 2px; + border-left-color: #987345; +} + +.chart-itinerary-row { + min-height: 32px; + padding: 3px 5px; + border-bottom-width: 1px; + border-bottom-color: #cdbb97; +} + +.chart-itinerary-row-next { + background-color: rgba(84, 121, 110, .16); + border-left-width: 2px; + border-left-color: #54796e; +} + +.chart-itinerary-number { + color: #756447; + width: 43px; + flex-shrink: 0; + font-size: 11px; + -unity-font-style: bold; +} + +.chart-itinerary-call { + flex-grow: 1; +} + +.chart-itinerary-port, +.chart-itinerary-selection { + color: #294745; + font-size: 14px; + -unity-font-style: bold; +} + +.chart-itinerary-selection { + margin-top: 8px; +} + +.chart-itinerary-note { + color: #605647; + white-space: normal; + font-size: 11px; +} + +.chart-itinerary-controls { + flex-wrap: wrap; + margin-top: 7px; +} + +.chart-itinerary-connections { + flex-wrap: wrap; +} + +.navigation-chart .chart-itinerary-mini { + min-height: 24px; + font-size: 11px; + padding: 3px 7px; + margin-right: 4px; +} + +.navigation-chart .chart-itinerary-choice { + margin-top: 4px; + color: #284a4c; + border-color: #b6a07b; + background-color: #f0e7cd; +} + +.navigation-chart .chart-itinerary-choice-restricted { + color: #70624c; +} + +.navigation-chart .chart-itinerary-choice-selected, +.navigation-chart .chart-itinerary-choice:hover, +.navigation-chart .chart-itinerary-choice:focus { + color: #fff1d4; + background-color: #396560; + border-color: #3f827b; +} + +.navigation-chart .chart-port-planned { + border-color: #83d5c4; +} + +.navigation-chart .chart-port-next { + border-color: #ffd58f; + border-width: 2px; +} diff --git a/Assets/Soundings/Resources/Ledger.uss b/Assets/Soundings/Resources/Ledger.uss index 69e5b4a..d4d021a 100644 --- a/Assets/Soundings/Resources/Ledger.uss +++ b/Assets/Soundings/Resources/Ledger.uss @@ -368,3 +368,7 @@ .log-charter { margin-top: 10px; color: #6b502d; } .log-charter-terms { font-size: 12px; color: #655e48; margin: 2px 0 6px; } +.log-next-leg { + align-self: flex-start; + margin: 6px 0 3px; +} diff --git a/Assets/Soundings/Resources/Passage.uss b/Assets/Soundings/Resources/Passage.uss index 0b6e859..1413bdc 100644 --- a/Assets/Soundings/Resources/Passage.uss +++ b/Assets/Soundings/Resources/Passage.uss @@ -198,3 +198,27 @@ white-space: normal; margin-top: 2px; } + +.voyage-map { + position: absolute; + top: 92px; + bottom: 150px; + left: 19%; + right: 19%; + padding: 11px 13px; + background-color: #102a34; + border-width: 1px; + border-top-width: 2px; + border-color: #ba9960; +} +.voyage-map-header, .voyage-map-footer, .voyage-map-legend, .voyage-map-key { flex-direction: row; align-items: center; } +.voyage-map-header, .voyage-map-footer { justify-content: space-between; } +.voyage-map-heading { flex-shrink: 1; } +.voyage-map-title { color: #f1e2bd; font-size: 28px; } +.voyage-map-readout { color: #c4d6d1; font-size: 12px; margin-top: 2px; } +.voyage-map-plot { flex-grow: 1; overflow: hidden; margin: 9px 0; background-color: #132f3b; border-width: 1px; border-color: #486966; } +.voyage-map-port { position: absolute; padding: 2px 5px; color: #d7e2d6; background-color: rgba(12, 32, 41, .92); font-size: 11px; } +.voyage-map-port-next { color: #f7d697; -unity-font-style: bold; } +.voyage-map-north { position: absolute; top: 8px; left: 10px; color: #c4d6d1; font-size: 12px; } +.voyage-map-key { margin-left: 10px; } +.voyage-map-swatch { width: 12px; height: 2px; margin-right: 4px; } diff --git a/Assets/Soundings/Runtime/Company.cs b/Assets/Soundings/Runtime/Company.cs index 23ecbd9..3d8ab4f 100644 --- a/Assets/Soundings/Runtime/Company.cs +++ b/Assets/Soundings/Runtime/Company.cs @@ -18,6 +18,7 @@ namespace Soundings public int[] ServicePrices; public double FuelValue; public List Decks = new List(); + public CruiseItinerary Itinerary; public HullSpec Hull => Market.Hulls[HullIndex]; public int Beds => Count(Facility.Cabin) * Market.Facilities[(int)Facility.Cabin].Capacity; @@ -53,6 +54,7 @@ namespace Soundings public int Origin, Destination, Miles, Days, Day, Fare, Guests, RoomDemand, Capacity, FuelBurn, Reserve, TicketSales, OnboardSales, Crew, Catering, PortFees, FuelExpense, LoanInterest, Principal, ReputationChange; public string ShipName; + public int ItineraryStartDay, ItineraryLeg, ItineraryLegs; public OnboardReport Onboard; public DeparturePlan Plan; public WeatherCondition Weather; @@ -64,7 +66,7 @@ namespace Soundings } [Serializable] - public sealed class Company + public sealed partial class Company { public const int SaveVersion = 1; public const int MaxHistory = 30; @@ -121,7 +123,7 @@ namespace Soundings return false; } - if (ship.Fuel > ship.Tank) + if (ship.Fuel > ship.Tank || !ValidSavedItinerary(ship)) return false; } @@ -318,8 +320,7 @@ namespace Soundings PortSpec from = Market.Ports[ship.Port]; PortSpec to = Market.Ports[destination]; int days = 1 + (int)Math.Ceiling(miles / 415.0); - int fuel = (int)Math.Ceiling(ship.BurnPerMile * miles); - int reserve = Math.Max(6, (int)Math.Ceiling(fuel * .12)); + var (fuel, reserve) = LegFuel(ship, miles); double referenceFare = 330 + days * 88 + to.Appeal * 125; double fareFactor = Math.Pow(referenceFare / ship.Fare, 1.55); double season = 1 + .13 * Math.Cos((Day + destination * 13) * 2 * Math.PI / 112); @@ -369,8 +370,10 @@ namespace Soundings public string DepartureBlock(Ship ship, Voyage quote) { - if (quote == null || quote.Destination == ship.Port) + if (ship == null || quote == null || quote.Origin != ship.Port || !Market.TryDistance(ship.Port, quote.Destination, out _)) return "Select a connected port from your itinerary."; + if (ship.Itinerary is { HasNext: true } itinerary && quote.Destination != itinerary.NextPort) + return $"This itinerary's next stop is {Market.Ports[itinerary.NextPort].Name}."; if (!Permits[quote.Destination]) return "Obtain a destination permit in Ports."; if (ship.HullIndex < Market.Ports[quote.Destination].MinimumHull) @@ -393,8 +396,10 @@ namespace Soundings public string Sail(Ship ship, int destination, OnboardSession live = null) { + if (ship == null || !Fleet.Contains(ship)) + return "Choose a ship in this fleet."; Voyage quote = live?.Quote ?? Forecast(ship, destination); - if (live != null && (live.Ship != ship || quote.Origin != ship.Port || quote.Destination != destination)) + if (live != null && (live.Ship != ship || quote.Origin != ship.Port || quote.Destination != destination || quote.Day <= Day)) return "This sailing has already been settled or belongs to another ship."; string block = DepartureBlock(ship, quote); if (block != null) @@ -414,6 +419,7 @@ namespace Soundings ship.FuelValue *= (double)(ship.Fuel - quote.FuelBurn) / ship.Fuel; ship.Fuel -= quote.FuelBurn; ship.Condition = Market.Clamp(ship.Condition - Math.Max(1, quote.Days / 2) + (quote.Onboard?.Repair ?? 0), 24, 100); + RecordItineraryArrival(ship, quote); ship.Port = quote.Destination; Day = quote.Day; Cash += quote.CashChange; diff --git a/Assets/Soundings/Runtime/CompanyPages.cs b/Assets/Soundings/Runtime/CompanyPages.cs index 2867034..91c4761 100644 --- a/Assets/Soundings/Runtime/CompanyPages.cs +++ b/Assets/Soundings/Runtime/CompanyPages.cs @@ -53,7 +53,14 @@ namespace Soundings private void OpenVoyageChart() { - int port = destination >= 0 ? destination : Ship?.Port ?? 0; + itineraryEditorShip = null; + int planned = Ship?.Itinerary?.NextPort ?? -1; + int port = planned >= 0 ? planned : destination >= 0 ? destination : Ship?.Port ?? 0; + if (planned >= 0 && destination != planned) + { + destination = planned; + SetRecommendedFuel(); + } worldChart = port >= Market.StarterPortCount || (Ship?.Port ?? 0) >= Market.StarterPortCount; inspectedPort = port; chartScrollPosition = 0; @@ -75,6 +82,8 @@ namespace Soundings var switches = Add(board, "chart-scopes"); switches.Add(Action("Atlantic", () => ChangeChart(false), worldChart ? "chart-scope" : "chart-scope chart-scope-current", "chart-atlantic")); switches.Add(Action("World", () => ChangeChart(true), worldChart ? "chart-scope chart-scope-current" : "chart-scope", "chart-world")); + if (Ship != null) + DrawItineraryButton(switches, Ship); for (int i = 0; i < ChartPortCount; i++) { @@ -90,6 +99,13 @@ namespace Soundings styles += " chart-port-locked"; if (selected) styles += " chart-port-selected"; + if (Ship?.Itinerary is CruiseItinerary itinerary) + { + if (IsPendingCall(itinerary, i)) + styles += " chart-port-planned"; + if (i == itinerary.NextPort) + styles += " chart-port-next"; + } var marker = Action("", () => InspectChartPort(portId), styles, "port-" + i); marker.tooltip = $"{port.Name} · {(berth ? "Current port" : cleared ? "Permit held" : "Permit required")}"; @@ -99,7 +115,7 @@ namespace Soundings var light = Add(marker, "chart-pin-light"); light.pickingMode = PickingMode.Ignore; var caption = AddText(marker, port.Name, point.x > .77f ? "chart-pin-label chart-pin-label-west" : "chart-pin-label"); - caption.EnableInClassList("chart-pin-label-on-focus", worldChart && !selected && !berth); + caption.EnableInClassList("chart-pin-label-on-focus", worldChart && !selected && !berth && Ship?.Itinerary?.NextPort != i); plot.Add(marker); } @@ -118,7 +134,10 @@ namespace Soundings var contents = Add(folio, "chart-folio-content"); AddText(contents, "LOOK UP PORT", "chart-paper-kicker"); AddChartDirectory(contents); - DrawPortFolio(board, contents); + if (EditingItinerary) + DrawItineraryFolio(contents, Ship); + else + DrawPortFolio(board, contents); } private static void ChartKey(VisualElement legend, string name, string color) @@ -154,11 +173,15 @@ namespace Soundings Voyage quote = ship == null ? null : company.Forecast(ship, selected); bool permitted = company.Permits[selected]; bool eligible = ship == null || ship.HullIndex >= port.MinimumHull; + int nextCall = ship?.Itinerary?.NextPort ?? -1; AddDisplay(parent, port.Name, "chart-port-name"); AddText(parent, $"{port.Country} · {port.Region}", "chart-paper-caption"); - if (quote != null && permitted && eligible) + if (nextCall >= 0) + DrawNextCall(parent, ship.Itinerary, selected); + + if (quote != null && permitted && eligible && (nextCall < 0 || selected == nextCall)) { DrawVoyageFolio(board, parent, ship, quote); return; @@ -199,7 +222,7 @@ namespace Soundings AddText(parent, "Assign a vessel to plan a sailing.", "chart-paper-note"); parent.Add(Action("Visit shipyard", () => ChangePage(2), "chart-ink-button chart-wide-button")); } - else + else if (nextCall < 0) { AddText(parent, $"There is no direct route from {Market.Ports[ship.Port].Name}. Select a linked port to plan this sailing.", "chart-paper-note"); } @@ -209,10 +232,13 @@ namespace Soundings private void InspectChartPort(int port) { + if (port >= Market.StarterPortCount) + worldChart = true; if (port != inspectedPort) chartScrollPosition = 0; inspectedPort = port; - if (Ship != null && Market.TryDistance(Ship.Port, port, out _) && destination != port) + if (Ship != null && !EditingItinerary && Ship.Itinerary?.HasNext != true + && Market.TryDistance(Ship.Port, port, out _) && destination != port) { destination = port; SetRecommendedFuel(); @@ -304,9 +330,11 @@ namespace Soundings painter.Stroke(); } - int berth = Ship?.Port ?? -1; + Ship ship = Ship; + int berth = ship?.Port ?? -1; + int selectionOrigin = EditingItinerary && ship != null ? ItineraryTail(ship) : berth; bool CanShow(Lane lane) => lane.A < ChartPortCount && lane.B < ChartPortCount; - bool IsSelected(Lane lane) => berth >= 0 && lane.Other(berth) == inspectedPort; + bool IsSelected(Lane lane) => selectionOrigin >= 0 && lane.Other(selectionOrigin) == inspectedPort; foreach (Lane lane in Market.Lanes) { @@ -323,6 +351,29 @@ namespace Soundings DrawLane(lane, new Color(.98f, .75f, .38f, 1), 2.3f); } + if (ship?.Itinerary is CruiseItinerary itinerary) + { + int from = itinerary.Origin; + for (int i = 0; i < itinerary.TotalStops; i++) + { + int to = itinerary.Stops[i]; + var route = new Lane(from, to, 0); + if (i != itinerary.CompletedStops && CanShow(route)) + { + Color color = i < itinerary.CompletedStops ? new Color(.48f, .64f, .61f, .74f) : new Color(.48f, .88f, .78f); + DrawLane(route, color, 2.4f); + } + from = to; + } + + var nextRoute = new Lane(berth, itinerary.NextPort, 0); + if (itinerary.HasNext && CanShow(nextRoute)) + { + DrawLane(nextRoute, new Color(.94f, .74f, .40f, .23f), 8); + DrawLane(nextRoute, new Color(1f, .85f, .55f), 3f); + } + } + DrawCompass(painter, new Vector2(width - 69, height - 76), 34); void DrawLane(Lane lane, Color color, float thickness) diff --git a/Assets/Soundings/Runtime/CruiseItinerary.cs b/Assets/Soundings/Runtime/CruiseItinerary.cs new file mode 100644 index 0000000..69b8733 --- /dev/null +++ b/Assets/Soundings/Runtime/CruiseItinerary.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; + +namespace Soundings +{ + [Serializable] + public sealed class CruiseItinerary + { + public int Origin, StartDay, CompletedStops; + public List Stops = new List(); + + public int TotalStops => Stops?.Count ?? 0; + public bool HasNext => CompletedStops >= 0 && CompletedStops < TotalStops; + public int NextPort => HasNext ? Stops[CompletedStops] : -1; + public int LastPort => TotalStops > 0 ? Stops[TotalStops - 1] : Origin; + } + + public sealed partial class Company + { + public string ItineraryStopBlock(Ship ship, int port) + { + if (ship == null || !Fleet.Contains(ship)) + return "Choose a ship in this fleet."; + int origin = ship.Itinerary is { HasNext: true } itinerary ? itinerary.LastPort : ship.Port; + return ItineraryLaneBlock(ship, origin, port); + } + + public string AppendItineraryStop(Ship ship, int port) + { + string block = ItineraryStopBlock(ship, port); + if (block != null) + return block; + if (ship.Itinerary == null || !ship.Itinerary.HasNext) + ship.Itinerary = new CruiseItinerary { Origin = ship.Port }; + ship.Itinerary.Stops.Add(port); + return null; + } + + public string ItineraryRemovalBlock(Ship ship, int index) + { + if (ship == null || !Fleet.Contains(ship)) + return "Choose a ship in this fleet."; + CruiseItinerary itinerary = ship.Itinerary; + if (itinerary == null || index < 0 || index >= itinerary.TotalStops) + return "Select a planned stop."; + if (index < itinerary.CompletedStops) + return "This port call is already recorded."; + if (index == itinerary.TotalStops - 1) + return null; + + int origin = index == 0 ? itinerary.Origin : itinerary.Stops[index - 1]; + return ItineraryLaneBlock(ship, origin, itinerary.Stops[index + 1]); + } + + public string RemoveItineraryStop(Ship ship, int index) + { + string block = ItineraryRemovalBlock(ship, index); + if (block != null) + return block; + ship.Itinerary.Stops.RemoveAt(index); + if (ship.Itinerary.TotalStops == 0) + ship.Itinerary = null; + return null; + } + + public string ClearItinerary(Ship ship) + { + if (ship == null || !Fleet.Contains(ship)) + return "Choose a ship in this fleet."; + ship.Itinerary = null; + return null; + } + + private string ItineraryLaneBlock(Ship ship, int origin, int destination) + { + if (destination < 0 || destination >= Market.Ports.Count) + return "Select a port to add to the itinerary."; + if (destination == origin) + return "Choose a different port for the next stop."; + if (!Market.TryDistance(origin, destination, out int miles)) + return $"There is no direct lane from {Market.Ports[origin].Name} to {Market.Ports[destination].Name}."; + + PortSpec port = Market.Ports[destination]; + if (!Permits[destination]) + return $"Acquire the permit for {port.Name} first."; + if (ship.HullIndex < port.MinimumHull) + return $"{port.Name} requires a {Market.Hulls[port.MinimumHull].Name} hull."; + var (burn, reserve) = LegFuel(ship, miles); + if (burn + reserve > ship.Tank) + return $"This leg needs {burn + reserve} t including reserve. Fit a larger fuel tank first."; + return null; + } + + private bool ValidSavedItinerary(Ship ship) + { + CruiseItinerary itinerary = ship.Itinerary; + if (itinerary == null) + return true; + if (itinerary.CompletedStops < 0 || itinerary.CompletedStops > itinerary.TotalStops) + return false; + if (itinerary.TotalStops == 0) + return itinerary.StartDay == 0; + if (itinerary.Origin < 0 || itinerary.Origin >= Market.Ports.Count) + return false; + if (itinerary.CompletedStops == 0 ? itinerary.StartDay != 0 : itinerary.StartDay < 1 || itinerary.StartDay >= Day) + return false; + + int origin = itinerary.Origin; + foreach (int port in itinerary.Stops) + { + if (port < 0 || port >= Market.Ports.Count || !Market.TryDistance(origin, port, out _)) + return false; + origin = port; + } + + int berth = itinerary.CompletedStops == 0 ? itinerary.Origin : itinerary.Stops[itinerary.CompletedStops - 1]; + return berth == ship.Port || !itinerary.HasNext; + } + + private static (int Burn, int Reserve) LegFuel(Ship ship, int miles) + { + int burn = (int)Math.Ceiling(ship.BurnPerMile * miles); + return (burn, Math.Max(6, (int)Math.Ceiling(burn * .12))); + } + + private void RecordItineraryArrival(Ship ship, Voyage quote) + { + if (ship.Itinerary is not { HasNext: true } itinerary) + return; + if (itinerary.CompletedStops == 0) + itinerary.StartDay = Day; + itinerary.CompletedStops++; + quote.ItineraryStartDay = itinerary.StartDay; + quote.ItineraryLeg = itinerary.CompletedStops; + quote.ItineraryLegs = itinerary.TotalStops; + } + } +} diff --git a/Assets/Soundings/Runtime/CruiseItinerary.cs.meta b/Assets/Soundings/Runtime/CruiseItinerary.cs.meta new file mode 100644 index 0000000..8db9e96 --- /dev/null +++ b/Assets/Soundings/Runtime/CruiseItinerary.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: c9d75326dc384c118cc5ddc7f54ed921 diff --git a/Assets/Soundings/Runtime/ItineraryPage.cs b/Assets/Soundings/Runtime/ItineraryPage.cs new file mode 100644 index 0000000..97e87ad --- /dev/null +++ b/Assets/Soundings/Runtime/ItineraryPage.cs @@ -0,0 +1,176 @@ +using UnityEngine.UIElements; + +namespace Soundings +{ + public sealed partial class SoundingsApp + { + private Ship itineraryEditorShip; + + private bool EditingItinerary => Ship != null && Ship == itineraryEditorShip; + + private static int ItineraryTail(Ship ship) => ship.Itinerary?.HasNext == true ? ship.Itinerary.LastPort : ship.Port; + + private static bool IsPendingCall(CruiseItinerary itinerary, int port) + { + for (int i = itinerary.CompletedStops; i < itinerary.TotalStops; i++) + if (itinerary.Stops[i] == port) + return true; + return false; + } + + private void DrawItineraryButton(VisualElement controls, Ship ship) + { + int calls = ship.Itinerary?.TotalStops ?? 0; + string label = calls > 0 ? $"Itinerary · {calls}" : "Itinerary"; + Button button = Action(label, () => + { + if (EditingItinerary) + CloseItinerary(); + else + { + itineraryEditorShip = ship; + portOrdersOpen = false; + chartScrollPosition = 0; + Notify(null); + Render(); + } + }, EditingItinerary ? "chart-scope chart-scope-current" : "chart-scope", "itinerary-open"); + button.tooltip = "Plan consecutive port calls for this ship"; + controls.Add(button); + } + + private void DrawItineraryFolio(VisualElement parent, Ship ship) + { + var header = Add(parent, "chart-itinerary-header"); + AddDisplay(header, "Itinerary", "chart-itinerary-title"); + header.Add(Action("Back", CloseItinerary, "chart-ink-button chart-itinerary-mini", "itinerary-close")); + + CruiseItinerary itinerary = ship.Itinerary; + if (itinerary?.HasNext == true) + { + parent.Add(Action($"Review next leg · {Market.Ports[itinerary.NextPort].Name}", + CloseItinerary, "chart-ink-button chart-itinerary-review", "itinerary-next")); + } + else if (itinerary?.TotalStops > 0) + AddText(parent, "Itinerary complete", "chart-itinerary-note"); + + AddText(parent, "PORT CALLS", "chart-paper-kicker chart-paper-section"); + int initial = itinerary?.Origin ?? ship.Port; + var departure = Add(parent, "chart-itinerary-row"); + AddText(departure, "START", "chart-itinerary-number"); + AddText(departure, Market.Ports[initial].Name, "chart-itinerary-port"); + if (itinerary != null) + { + int from = itinerary.Origin; + for (int index = 0; index < itinerary.TotalStops; index++) + { + int to = itinerary.Stops[index]; + var row = Add(parent, "chart-itinerary-row"); + row.EnableInClassList("chart-itinerary-row-next", index == itinerary.CompletedStops); + AddText(row, $"{index + 1:00}", "chart-itinerary-number"); + var copy = Add(row, "chart-itinerary-call"); + AddText(copy, Market.Ports[to].Name, "chart-itinerary-port"); + Market.TryDistance(from, to, out int miles); + string state = index < itinerary.CompletedStops ? "Visited" : index == itinerary.CompletedStops ? "Next" : "Planned"; + AddText(copy, $"{state} · {miles:N0} nm", "chart-itinerary-note"); + from = to; + } + + var controls = Add(parent, "chart-itinerary-controls"); + var remove = Action("Remove last call", () => UpdateItinerary(ship, + company.RemoveItineraryStop(ship, itinerary.TotalStops - 1), "Last call removed."), + "chart-ink-button chart-itinerary-mini", "itinerary-remove"); + remove.SetEnabled(itinerary.HasNext); + controls.Add(remove); + controls.Add(Action("Clear route", () => UpdateItinerary(ship, company.ClearItinerary(ship), "Itinerary cleared."), + "chart-ink-button chart-itinerary-mini", "itinerary-clear")); + } + + int tail = ItineraryTail(ship); + DrawItineraryConnections(parent, ship, tail); + + int selected = inspectedPort; + string portName = Market.Ports[selected].Name; + string blocked = company.ItineraryStopBlock(ship, selected); + AddText(parent, portName, "chart-itinerary-selection"); + if (Market.TryDistance(tail, selected, out int distance)) + AddText(parent, $"{distance:N0} nm from {Market.Ports[tail].Name}", "chart-itinerary-note"); + + var append = Action($"Add {portName}", () => UpdateItinerary(ship, company.AppendItineraryStop(ship, selected), + $"Added {portName} to the itinerary."), "chart-ink-button chart-itinerary-review", "itinerary-add"); + append.SetEnabled(blocked == null); + parent.Add(append); + if (blocked != null) + AddText(parent, blocked, "chart-itinerary-note"); + if (!company.Permits[selected] && Market.TryDistance(tail, selected, out _)) + { + var permit = Action($"Acquire permit · {Money(Market.Ports[selected].Permit)}", () => + Apply(company.Permit(selected), $"{portName} is now licensed."), + "chart-ink-button chart-itinerary-review", "permit"); + permit.SetEnabled(company.PermitBlock(selected) == null); + parent.Add(permit); + } + } + + private void DrawItineraryConnections(VisualElement parent, Ship ship, int tail) + { + AddText(parent, $"CONNECTED FROM {Market.Ports[tail].Name.ToUpperInvariant()}", "chart-paper-kicker chart-paper-section"); + var connections = Add(parent, "chart-itinerary-connections"); + foreach (Lane lane in Market.Lanes) + { + int port = lane.Other(tail); + if (port < 0) + continue; + var choice = Action(Market.Ports[port].Name, () => InspectChartPort(port), + "chart-ink-button chart-itinerary-mini chart-itinerary-choice", $"itinerary-port-{port}"); + choice.EnableInClassList("chart-itinerary-choice-selected", port == inspectedPort); + string blocker = company.ItineraryStopBlock(ship, port); + choice.EnableInClassList("chart-itinerary-choice-restricted", blocker != null); + choice.tooltip = blocker ?? $"{lane.Miles:N0} nm from {Market.Ports[tail].Name}"; + connections.Add(choice); + } + } + + private void DrawNextCall(VisualElement parent, CruiseItinerary itinerary, int selected) + { + var strip = Add(parent, "chart-itinerary-next"); + string name = Market.Ports[itinerary.NextPort].Name; + AddText(strip, $"LEG {itinerary.CompletedStops + 1} OF {itinerary.TotalStops}", "chart-paper-kicker"); + if (selected != itinerary.NextPort) + strip.Add(Action($"Review {name}", CloseItinerary, "chart-ink-button chart-itinerary-mini", "itinerary-next")); + } + + private void CloseItinerary() + { + itineraryEditorShip = null; + int planned = Ship?.Itinerary?.NextPort ?? -1; + if (planned >= 0) + { + destination = planned; + SetRecommendedFuel(); + InspectChartPort(planned); + } + else + { + chartScrollPosition = 0; + InspectChartPort(inspectedPort); + } + } + + private void UpdateItinerary(Ship ship, string failure, string success) + { + if (failure == null) + { + int planned = ship.Itinerary?.NextPort ?? -1; + if (planned >= 0) + { + destination = planned; + SetRecommendedFuel(); + } + else + ResetItinerary(); + } + Apply(failure, success); + } + } +} diff --git a/Assets/Soundings/Runtime/ItineraryPage.cs.meta b/Assets/Soundings/Runtime/ItineraryPage.cs.meta new file mode 100644 index 0000000..1196d0b --- /dev/null +++ b/Assets/Soundings/Runtime/ItineraryPage.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 63dd5ad68fc8a95f7900594456f4bb71 \ No newline at end of file diff --git a/Assets/Soundings/Runtime/LedgerPage.cs b/Assets/Soundings/Runtime/LedgerPage.cs index 98de233..a6e9485 100644 --- a/Assets/Soundings/Runtime/LedgerPage.cs +++ b/Assets/Soundings/Runtime/LedgerPage.cs @@ -56,6 +56,9 @@ namespace Soundings AddText(register, "VOYAGE REGISTER", "log-small-title"); AddDisplay(register, "Passages", "log-sheet-title"); AddText(register, $"{company.Voyages:N0} completed", "log-secondary"); + if (Ship?.Itinerary is { HasNext: true, CompletedStops: > 0 } itinerary) + register.Add(Action($"Plan next leg · {Market.Ports[itinerary.NextPort].Name}", OpenVoyageChart, + "log-paper-action log-next-leg", "log-next-leg")); AddText(register, company.Flagship ? "Flagship charter complete · Bermuda to Lisbon" : "Flagship charter · Bermuda to Lisbon", @@ -130,7 +133,8 @@ namespace Soundings private void DrawVoyageEntry(VisualElement leaf, Voyage trip) { - AddText(leaf, $"ARRIVED ON DAY {trip.Day}", "log-small-title"); + string leg = trip.ItineraryLeg > 0 ? $" · ITINERARY LEG {trip.ItineraryLeg} OF {trip.ItineraryLegs}" : ""; + AddText(leaf, $"ARRIVED ON DAY {trip.Day}{leg}", "log-small-title"); string origin = Market.Ports[trip.Origin].Name; string destinationName = Market.Ports[trip.Destination].Name; AddDisplay(leaf, $"{origin} to {destinationName}", "log-sheet-title log-route-title"); diff --git a/Assets/Soundings/Runtime/PassageAudio.cs b/Assets/Soundings/Runtime/PassageAudio.cs index 6b2e225..3913d80 100644 --- a/Assets/Soundings/Runtime/PassageAudio.cs +++ b/Assets/Soundings/Runtime/PassageAudio.cs @@ -3,7 +3,7 @@ using UnityEngine; namespace Soundings { - internal enum PassageAnnouncement { Departure, Dining, DiningSpecial, Bar, Show, Terrace } + internal enum PassageAnnouncement { Departure, Dining, DiningSpecial, Bar, Show, Terrace, Approach } internal sealed class PassageAudio : MonoBehaviour { @@ -20,15 +20,25 @@ namespace Soundings private AudioSource wind, engine, effects, voice; private AudioClip step, hardStep, confirmation; + private AudioClip departureForPort, approachForPort; private readonly AudioClip[] spoken = new AudioClip[Announcements.Length]; - private readonly float[] repeatAfter = new float[Announcements.Length]; + private readonly float[] repeatAfter = new float[(int)PassageAnnouncement.Approach + 1]; private float distanceSinceStep; private float announcementTime, announcementGap, announcementClock; - private bool leftFoot, crossing, voicePaused; + private bool leftFoot, crossing, voicePaused, approachSent; private PassageAnnouncement? currentAnnouncement, pendingAnnouncement; + private string nextPort; internal PassageAnnouncement? CurrentAnnouncement => currentAnnouncement; - internal string Caption => currentAnnouncement.HasValue ? Announcements[(int)currentAnnouncement.Value] : null; + internal float ApproachSeconds => approachForPort != null ? approachForPort.length : 0; + internal bool ApproachSent => approachSent; + internal string Caption => currentAnnouncement switch + { + PassageAnnouncement.Departure when departureForPort != null => $"Welcome aboard. We are now under way, and our next port of call is {nextPort}.", + PassageAnnouncement.Approach => $"May I have your attention, please. We are approaching {nextPort}.", + PassageAnnouncement line => Announcements[(int)line], + _ => null + }; internal void Initialize() { @@ -59,9 +69,13 @@ namespace Soundings spoken[i] = Resources.Load($"Audio/PA/{(PassageAnnouncement)i}"); } - internal void Begin() + internal void Begin(int destination) { crossing = true; + approachSent = false; + nextPort = Market.Ports[destination].Name; + departureForPort = LoadPortClip("Departure", destination); + approachForPort = LoadPortClip("Approach", destination); distanceSinceStep = 0; announcementClock = announcementGap = 0; Array.Clear(repeatAfter, 0, repeatAfter.Length); @@ -76,12 +90,14 @@ namespace Soundings voice.Stop(); voicePaused = false; currentAnnouncement = pendingAnnouncement = null; + departureForPort = approachForPort = null; + voice.clip = null; } internal void Announce(PassageAnnouncement line) { int index = (int)line; - if (!crossing || spoken[index] == null || currentAnnouncement == line || pendingAnnouncement == line + if (!crossing || ClipFor(line) == null || currentAnnouncement == line || pendingAnnouncement == line || repeatAfter[index] > announcementClock) return; @@ -91,6 +107,28 @@ namespace Soundings PlayAnnouncement(line); } + internal void AnnounceApproach() + { + if (!crossing || approachSent || approachForPort == null) + return; + + approachSent = true; + pendingAnnouncement = null; + announcementGap = 0; + voice.Stop(); + PlayAnnouncement(PassageAnnouncement.Approach); + } + + internal static AudioClip LoadPortClip(string announcement, int destination) => + Resources.Load($"Audio/PA/{announcement}Port{destination:D2}"); + + private AudioClip ClipFor(PassageAnnouncement line) => line switch + { + PassageAnnouncement.Departure when departureForPort != null => departureForPort, + PassageAnnouncement.Approach => approachForPort, + _ => spoken[(int)line] + }; + internal void Mix(float delta, bool active, float knots, WeatherCondition weather, bool indoors, bool engineering) { UpdateAnnouncements(delta, active); @@ -119,7 +157,7 @@ namespace Soundings { int index = (int)line; currentAnnouncement = line; - voice.clip = spoken[index]; + voice.clip = ClipFor(line); announcementTime = voice.clip.length; repeatAfter[index] = announcementClock + 20f; voice.Play(); diff --git a/Assets/Soundings/Runtime/PassageInterface.cs b/Assets/Soundings/Runtime/PassageInterface.cs index 0a5ca21..968b887 100644 --- a/Assets/Soundings/Runtime/PassageInterface.cs +++ b/Assets/Soundings/Runtime/PassageInterface.cs @@ -69,6 +69,9 @@ namespace Soundings controls.Add(Action("Bridge", ViewPassageBridge, PassageViewClass(passageBridge), "passage-bridge")); controls.Add(Action("Explore", ExplorePassageDeck, PassageViewClass(passageExploring && passageServiceArea < 0), "passage-explore")); controls.Add(Action("Service deck", () => ExploreServiceArea(0), PassageViewClass(passageServiceArea >= 0), "passage-service")); + Button map = Action("Voyage map", ToggleVoyageMap, PassageViewClass(voyageMapOpen), "voyage-map-toggle"); + map.tooltip = "Show or close the live voyage map (M)"; + controls.Add(map); controls.Add(Action("Reset camera", () => { if (passageBridge) @@ -90,7 +93,8 @@ namespace Soundings _ => "Calm seas" }; var routeContext = Add(route, "voyage-route-context"); - AddText(routeContext, $"UNDERWAY / {underway.ShipName.ToUpperInvariant()}", "voyage-caption"); + string leg = Ship.Itinerary is { HasNext: true } itinerary ? $"LEG {itinerary.CompletedStops + 1} OF {itinerary.TotalStops}" : "UNDERWAY"; + AddText(routeContext, $"{leg} / {underway.ShipName.ToUpperInvariant()}", "voyage-caption"); AddText(routeContext, sea, underway.Weather == WeatherCondition.Storm ? "voyage-conditions voyage-conditions-warning" : "voyage-conditions"); AddDisplay(route, $"{Market.Ports[underway.Origin].Name} → {Market.Ports[underway.Destination].Name}", "voyage-route-name"); @@ -120,8 +124,9 @@ namespace Soundings AddText(camera, cameraHelp, "voyage-camera-help"); rail.Add(Action("Skip to arrival", FinishVoyage, "voyage-view-button voyage-skip", "dock-now")); DrawHelmControls(overlay); - DrawAnnouncement(overlay); DrawStationInteractions(overlay); + DrawVoyageMap(overlay); + DrawAnnouncement(overlay); UpdatePassageUi(passageHelm.Progress); } diff --git a/Assets/Soundings/Runtime/SoundingsApp.cs b/Assets/Soundings/Runtime/SoundingsApp.cs index 5a022b1..f167093 100644 --- a/Assets/Soundings/Runtime/SoundingsApp.cs +++ b/Assets/Soundings/Runtime/SoundingsApp.cs @@ -131,6 +131,12 @@ namespace Soundings bunkerTons = 0; if (Ship == null) return; + if (Ship.Itinerary is { HasNext: true } itinerary) + { + destination = itinerary.NextPort; + SetRecommendedFuel(); + return; + } foreach (Lane lane in Market.Lanes) { int other = lane.Other(Ship.Port); @@ -384,7 +390,8 @@ namespace Soundings var commands = Add(scene, "helm-orders"); commands.pickingMode = PickingMode.Ignore; - Button plan = Action("Set course", OpenVoyageChart, "primary helm-command", "plan-voyage"); + Button plan = Action(ship.Itinerary is { HasNext: true, CompletedStops: > 0 } ? "Plan next leg" : "Set course", + OpenVoyageChart, "primary helm-command", "plan-voyage"); GameIcon(plan, "chart"); commands.Add(plan); var camera = Add(commands, "camera-legend"); diff --git a/Assets/Soundings/Runtime/VisualSmoke.cs b/Assets/Soundings/Runtime/VisualSmoke.cs index 3bce107..71ed72b 100644 --- a/Assets/Soundings/Runtime/VisualSmoke.cs +++ b/Assets/Soundings/Runtime/VisualSmoke.cs @@ -20,6 +20,15 @@ namespace Soundings string directory = args[index + 1]; Directory.CreateDirectory(directory); + for (int port = 0; port < Market.Ports.Count; port++) + { + if (!CheckSmoke(PassageAudio.LoadPortClip("Departure", port) is { length: > 1 } + && PassageAudio.LoadPortClip("Approach", port) is { length: > 1 }, "Named PA recordings for " + Market.Ports[port].Name)) + yield break; + } + Vector2[] pacific = MapPaths(new[] { 15, 16 })[0]; + if (!CheckSmoke(Mathf.Abs(pacific[MapSamples].x - pacific[0].x) < 45, "Voyage map wraps the date line")) + yield break; yield return CaptureSmoke(directory, "01-title"); if (!CheckSmoke(guidedCareer, "The guide is on by default") @@ -55,8 +64,8 @@ namespace Soundings && underway.Plan?.FoodUnits == 1120 && underway.Plan.Program == EntertainmentProgram.LiveMusic, "Cast off into an assisted live crossing")) yield break; - if (!CheckSmoke(passageAudio.CurrentAnnouncement == PassageAnnouncement.Departure && passageAudio.Caption.StartsWith("Welcome aboard"), - "Cast off starts the spoken welcome and its caption")) + if (!CheckSmoke(passageAudio.CurrentAnnouncement == PassageAnnouncement.Departure + && passageAudio.Caption.Contains("next port of call is Nassau"), "Cast off names Nassau on the ship's PA")) yield break; int mealPrice = livePassage.GetPrice(OnboardService.Meals); int provisions = livePassage.ProvisionsRemaining; @@ -204,24 +213,66 @@ namespace Soundings yield break; yield return CaptureSmoke(directory, "10-world"); - if (!SubmitSmoke("nav-0") || !SubmitSmoke("plan-voyage") || !SubmitSmoke("port-0") || !SubmitSmoke("weather-storm") + if (!SubmitSmoke("nav-0") || !SubmitSmoke("plan-voyage") || !SubmitSmoke("port-0") + || !SubmitSmoke("itinerary-open") || !SubmitSmoke("itinerary-add") || !SubmitSmoke("itinerary-port-2") + || !SubmitSmoke("itinerary-add") || !CheckSmoke(Ship.Itinerary is { TotalStops: 2, NextPort: 0, LastPort: 2 } + && destination == 0, "Plan Nassau to Miami to Key West without changing the first departure")) + yield break; + yield return CaptureSmoke(directory, "10a-itinerary-plan"); + if (!SubmitSmoke("itinerary-port-1") || !SubmitSmoke("itinerary-add") || !SubmitSmoke("itinerary-remove") + || !CheckSmoke(Ship.Itinerary.TotalStops == 2 && Ship.Itinerary.LastPort == 2, "Edit the last pending call") + || !SubmitSmoke("itinerary-next") || !SubmitSmoke("weather-storm") || !SubmitSmoke("dispatch") || !CheckSmoke(underway.Weather == WeatherCondition.Storm - && livePassage.Get(OnboardService.Amenities).Capacity == 0, "Rough sea closes outdoor amenities")) + && livePassage.Get(OnboardService.Amenities).Capacity == 0 && passageAudio.Caption.Contains("Miami"), + "Depart for the first planned call in a storm")) yield break; SelectPassageDeck(2); if (!CheckSmoke(passageDeck == 2, "Visit the newly fitted third deck during the next crossing")) yield break; MovePassageToSmoke(.42f); yield return CaptureSmoke(directory, "11-new-service-deck"); + if (!SubmitSmoke("voyage-map-toggle") || !CheckSmoke(voyageMapOpen && voyageMapPlot != null, "Open the live voyage map")) + yield break; + yield return CaptureSmoke(directory, "11a-live-voyage-map"); + if (!SubmitSmoke("voyage-map-close")) + yield break; SetPassageSpeed(4); if (!CheckSmoke(passageSpeed == 4, "Fast-forward setting")) yield break; - MovePassageToSmoke(.95f); + MovePassageToSmoke(.87f); + UpdatePortApproach(); + if (!CheckSmoke(passageAudio.ApproachSent && passageAudio.CurrentAnnouncement == PassageAnnouncement.Approach + && passageAudio.Caption.Contains("approaching Miami"), "The ship announces its approach to Miami before docking")) + yield break; + yield return CaptureSmoke(directory, "11b-approaching-miami"); float timeout = Time.realtimeSinceStartup + 15; while (underway != null && Time.realtimeSinceStartup < timeout) yield return null; - if (!CheckSmoke(underway == null && Ship.Port == 0 && company.Voyages == 2, "Timed passage and second settlement")) + if (!CheckSmoke(underway == null && Ship.Port == 0 && company.Voyages == 2 + && Ship.Itinerary is { CompletedStops: 1, NextPort: 2 } + && company.History[0].ItineraryLeg == 1, "Settle the first itinerary leg and remain in Miami")) yield break; + company = JsonUtility.FromJson(JsonUtility.ToJson(company)); + if (!CheckSmoke(company.CanLoad() && Ship.Itinerary.NextPort == 2, "Continue the same ship's itinerary after reloading at a call")) + yield break; + ResetItinerary(); + Render(); + yield return CaptureSmoke(directory, "11c-intermediate-arrival"); + if (!SubmitSmoke("log-next-leg") || !CheckSmoke(destination == 2 && inspectedPort == 2, "Review the next call from the Logbook") + || !SubmitSmoke("buy-fuel") || !SubmitSmoke("dispatch") + || !CheckSmoke(underway.Origin == 0 && underway.Destination == 2 && passageAudio.Caption.Contains("Key West"), + "Fuel at the intermediate stop and cast off with the correct new port name")) + yield break; + MovePassageToSmoke(.9f); + UpdatePortApproach(); + if (!CheckSmoke(passageAudio.CurrentAnnouncement == PassageAnnouncement.Approach + && passageAudio.Caption.Contains("approaching Key West"), "The second leg announces Key West") + || !SubmitSmoke("dock-now") || !CheckSmoke(Ship.Port == 2 && company.Voyages == 3 + && Ship.Itinerary is { CompletedStops: 2, HasNext: false } + && company.History[0].ItineraryLeg == 2 && company.History[0].ItineraryStartDay == company.History[1].ItineraryStartDay, + "Complete the itinerary with two linked ledger records")) + yield break; + yield return CaptureSmoke(directory, "11d-itinerary-complete"); if (!SubmitSmoke("company-menu") || !SubmitSmoke("return-title") || !SubmitSmoke("start-financed") || !SubmitSmoke("replace") || !CheckSmoke(company.Debt == 500000 && company.Fleet.Count == 0 && guideContext == GuideStep.GetShip, "Guided financed start")) diff --git a/Assets/Soundings/Runtime/VoyageMap.cs b/Assets/Soundings/Runtime/VoyageMap.cs new file mode 100644 index 0000000..a28480a --- /dev/null +++ b/Assets/Soundings/Runtime/VoyageMap.cs @@ -0,0 +1,298 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UIElements; + +namespace Soundings +{ + public sealed partial class SoundingsApp + { + private const int MapSamples = 40; + private static readonly Color MapCompleted = new(.49f, .66f, .65f); + private static readonly Color MapCurrent = new(.98f, .79f, .44f); + private static readonly Color MapPlanned = new(.31f, .79f, .68f); + private bool voyageMapOpen; + private VisualElement voyageMapPlot; + private Label voyageMapReadout; + private float nextMapUpdate; + + private void ToggleVoyageMap() + { + voyageMapOpen = !voyageMapOpen; + Render(); + } + + private void DrawVoyageMap(VisualElement overlay) + { + voyageMapPlot = null; + if (!voyageMapOpen) + return; + + CruiseItinerary itinerary = Ship.Itinerary; + bool scheduled = itinerary is { HasNext: true } && itinerary.NextPort == underway.Destination; + int currentLeg = scheduled ? itinerary.CompletedStops : 0; + var ports = new int[scheduled ? itinerary.TotalStops + 1 : 2]; + ports[0] = scheduled ? itinerary.Origin : underway.Origin; + if (scheduled) + itinerary.Stops.CopyTo(ports, 1); + else + ports[1] = underway.Destination; + + Vector2[][] paths = MapPaths(ports); + var chart = Add(overlay, "voyage-map"); + var header = Add(chart, "voyage-map-header"); + var heading = Add(header, "voyage-map-heading"); + AddDisplay(heading, "Voyage map", "voyage-map-title"); + AddText(heading, scheduled ? $"Leg {currentLeg + 1} of {ports.Length - 1} · {underway.ShipName}" : underway.ShipName, + "voyage-map-readout"); + header.Add(Action("Close M", ToggleVoyageMap, "voyage-view-button", "voyage-map-close")); + + var plot = Add(chart, "voyage-map-plot"); + voyageMapPlot = plot; + AddText(plot, "N ↑", "voyage-map-north").pickingMode = PickingMode.Ignore; + var labels = new Dictionary(); + foreach (int port in ports) + { + if (labels.ContainsKey(port)) + continue; + Label label = AddText(plot, Market.Ports[port].Name, "voyage-map-port"); + label.pickingMode = PickingMode.Ignore; + if (port == underway.Destination) + label.AddToClassList("voyage-map-port-next"); + labels.Add(port, label); + } + plot.generateVisualContent += context => PaintVoyageMap(context, paths, currentLeg); + plot.RegisterCallback(change => PlaceMapLabels(change.newRect.size, paths, ports, labels)); + + var footer = Add(chart, "voyage-map-footer"); + voyageMapReadout = AddText(footer, "", "voyage-map-readout"); + var legend = Add(footer, "voyage-map-legend"); + if (currentLeg > 0) + MapLegend(legend, "Sailed", MapCompleted); + MapLegend(legend, "Current leg", MapCurrent); + if (currentLeg < paths.Length - 1) + MapLegend(legend, "Later calls", MapPlanned); + nextMapUpdate = 0; + UpdateVoyageMap(); + } + + private static void MapLegend(VisualElement legend, string text, Color color) + { + var key = Add(legend, "voyage-map-key"); + Add(key, "voyage-map-swatch").style.backgroundColor = color; + AddText(key, text, "voyage-map-readout"); + } + + private void UpdateVoyageMap() + { + if (voyageMapPlot == null || Time.unscaledTime < nextMapUpdate) + return; + nextMapUpdate = Time.unscaledTime + .08f; + float duration = PassageDuration(underway); + int distance = Mathf.RoundToInt(underway.Miles * passageHelm.RemainingSeconds / duration); + int heading = Mathf.RoundToInt(Mathf.Repeat(CourseBearing(Market.Ports[underway.Origin], Market.Ports[underway.Destination]) + + passageHelm.Heading, 360)) % 360; + SetPassageText(voyageMapReadout, $"{Market.Ports[underway.Destination].Name} · {distance:N0} nm · {heading:000}° · {passageHelm.Speed:F1} kn"); + voyageMapPlot.MarkDirtyRepaint(); + } + + private static Vector2[][] MapPaths(int[] ports) + { + var paths = new Vector2[ports.Length - 1][]; + float longitude = Market.Ports[ports[0]].Longitude; + for (int leg = 0; leg < paths.Length; leg++) + { + PortSpec origin = Market.Ports[ports[leg]], dest = Market.Ports[ports[leg + 1]]; + float start = longitude; + longitude = start + Mathf.DeltaAngle(start, dest.Longitude); + Vector3 a = GlobePoint(origin), b = GlobePoint(dest); + Vector2[] path = paths[leg] = new Vector2[MapSamples + 1]; + for (int s = 0; s <= MapSamples; s++) + { + float t = (float)s / MapSamples; + Vector3 point = Vector3.Slerp(a, b, t); + float expected = Mathf.Lerp(start, longitude, t); + float lon = Mathf.Atan2(point.z, point.x) * Mathf.Rad2Deg; + path[s] = new Vector2(expected + Mathf.DeltaAngle(expected, lon), -Mathf.Asin(point.y) * Mathf.Rad2Deg); + } + } + return paths; + } + + private static Vector3 GlobePoint(PortSpec port) + { + float lat = port.Latitude * Mathf.Deg2Rad, lon = port.Longitude * Mathf.Deg2Rad; + return new Vector3(Mathf.Cos(lat) * Mathf.Cos(lon), Mathf.Sin(lat), Mathf.Cos(lat) * Mathf.Sin(lon)); + } + + private readonly struct MapProjection + { + public readonly Vector2 Center, Dimensions; + public readonly float Scale; + + public MapProjection(Vector2 size, Vector2[][] paths) + { + var minimum = paths[0][0]; + var maximum = minimum; + foreach (Vector2[] path in paths) + foreach (Vector2 point in path) + { + minimum = Vector2.Min(minimum, point); + maximum = Vector2.Max(maximum, point); + } + Center = (minimum + maximum) * .5f; + Vector2 span = Vector2.Max(maximum - minimum, new Vector2(5.5f, 3.1f)); + Scale = Mathf.Max(.01f, Mathf.Min((size.x - 146) / span.x, (size.y - 86) / span.y)); + Dimensions = size; + } + + public Vector2 Pixel(Vector2 point) => Dimensions * .5f + (point - Center) * Scale; + } + + private static void PlaceMapLabels(Vector2 size, Vector2[][] paths, int[] ports, Dictionary labels) + { + var projection = new MapProjection(size, paths); + var used = new HashSet(); + var rows = new List(ports.Length); + for (int i = 0; i < ports.Length; i++) + { + int port = ports[i]; + if (!used.Add(port)) + continue; + Vector2 pixel = projection.Pixel(i == 0 ? paths[0][0] : paths[i - 1][MapSamples]); + Label label = labels[port]; + float width = Mathf.Min(150, label.text.Length * 7 + 12); + float x = Mathf.Clamp(pixel.x + 10, 7, Mathf.Max(7, size.x - width - 7)); + float y = Mathf.Clamp(pixel.y - 21, 6, Mathf.Max(6, size.y - 26)); + var area = new Rect(x, y, width, 20); + for (int j = 0; j < rows.Count; j++) + { + if (area.Overlaps(rows[j])) + area.y = Mathf.Min(size.y - 26, rows[j].yMax + 2); + } + rows.Add(area); + label.style.left = area.x; + label.style.top = area.y; + } + } + + private void PaintVoyageMap(MeshGenerationContext context, Vector2[][] paths, int currentLeg) + { + Vector2 size = context.visualElement.contentRect.size; + if (size.x < 50 || size.y < 50) + return; + var projection = new MapProjection(size, paths); + Painter2D pen = context.painter2D; + PaintMapGrid(pen, projection); + PaintMapCoast(pen, projection); + + for (int i = 0; i < paths.Length; i++) + { + if (i == currentLeg) + continue; + Color color = i < currentLeg ? MapCompleted : MapPlanned; + PaintMapPath(pen, projection, paths[i], color, 1.65f); + PaintMapPort(pen, projection.Pixel(paths[i][0]), color); + PaintMapPort(pen, projection.Pixel(paths[i][MapSamples]), color); + } + + Vector2[] current = paths[currentLeg]; + PaintMapPath(pen, projection, current, new Color(.98f, .79f, .44f, .21f), 8); + PaintMapPath(pen, projection, current, MapCurrent, 2.6f); + PaintMapPort(pen, projection.Pixel(current[0]), MapCurrent); + PaintMapPort(pen, projection.Pixel(current[MapSamples]), MapCurrent); + Vector2 travel = passageHelm.Position / PassageDuration(underway); + float step = travel.x * MapSamples; + int segment = Mathf.Clamp(Mathf.FloorToInt(step), 0, MapSamples - 1); + Vector2 tangent = (current[segment + 1] - current[segment]).normalized; + Vector2 right = new(-tangent.y, tangent.x); + float span = Vector2.Distance(current[0], current[MapSamples]); + Vector2 course = Vector2.LerpUnclamped(current[segment], current[segment + 1], step - segment); + Vector2 location = projection.Pixel(course + right * (travel.y * span)); + location.x = Mathf.Clamp(location.x, 14, size.x - 14); + location.y = Mathf.Clamp(location.y, 14, size.y - 14); + float angle = passageHelm.Heading * Mathf.Deg2Rad; + Vector2 forward = tangent * Mathf.Cos(angle) + right * Mathf.Sin(angle); + Vector2 wing = new(-forward.y, forward.x); + pen.fillColor = MapCurrent; + pen.strokeColor = new Color(.09f, .18f, .22f); + pen.lineWidth = 1.5f; + pen.BeginPath(); + pen.MoveTo(location + forward * 11); + pen.LineTo(location - forward * 8 + wing * 6); + pen.LineTo(location - forward * 4); + pen.LineTo(location - forward * 8 - wing * 6); + pen.ClosePath(); + pen.Fill(); + pen.Stroke(); + } + + private static void PaintMapGrid(Painter2D pen, MapProjection map) + { + Vector2 reach = map.Dimensions / (2 * map.Scale); + float wanted = reach.x / 4; + float factor = Mathf.Pow(10, Mathf.Floor(Mathf.Log10(wanted))); + float interval = factor * (wanted / factor >= 5 ? 5 : wanted / factor >= 2 ? 2 : 1); + pen.strokeColor = new Color(.37f, .59f, .62f, .26f); + pen.lineWidth = 1; + pen.BeginPath(); + for (float lon = Mathf.Ceil((map.Center.x - reach.x) / interval) * interval; lon <= map.Center.x + reach.x; lon += interval) + { + float x = map.Pixel(new Vector2(lon, 0)).x; + pen.MoveTo(new Vector2(x, 0)); + pen.LineTo(new Vector2(x, map.Dimensions.y)); + } + for (float lat = Mathf.Ceil((map.Center.y - reach.y) / interval) * interval; lat <= map.Center.y + reach.y; lat += interval) + { + float y = map.Pixel(new Vector2(0, lat)).y; + pen.MoveTo(new Vector2(0, y)); + pen.LineTo(new Vector2(map.Dimensions.x, y)); + } + pen.Stroke(); + } + + private static void PaintMapCoast(Painter2D pen, MapProjection projection) + { + float reach = projection.Dimensions.x / (2 * projection.Scale); + int first = Mathf.FloorToInt((projection.Center.x - reach + 180) / 360); + int last = Mathf.FloorToInt((projection.Center.x + reach + 180) / 360); + pen.fillColor = new Color(.14f, .27f, .28f); + pen.strokeColor = new Color(.48f, .61f, .51f, .73f); + pen.lineWidth = 1.1f; + for (int zone = first; zone <= last; zone++) + foreach (Vector2[] coast in WorldCoastlines.Shapes) + { + pen.BeginPath(); + for (int i = 0; i < coast.Length; i++) + { + Vector2 visual = projection.Pixel(new Vector2(coast[i].x * 360 - 180 + zone * 360, coast[i].y * 137 - 76)); + if (i == 0) + pen.MoveTo(visual); + else + pen.LineTo(visual); + } + pen.ClosePath(); + pen.Fill(); + pen.Stroke(); + } + } + + private static void PaintMapPath(Painter2D pen, MapProjection projection, Vector2[] path, Color color, float width) + { + pen.strokeColor = color; + pen.lineWidth = width; + pen.BeginPath(); + pen.MoveTo(projection.Pixel(path[0])); + for (int i = 1; i < path.Length; i++) + pen.LineTo(projection.Pixel(path[i])); + pen.Stroke(); + } + + private static void PaintMapPort(Painter2D pen, Vector2 port, Color color) + { + pen.fillColor = color; + pen.BeginPath(); + pen.Arc(port, 4.1f, 0, 360); + pen.Fill(); + } + } +} diff --git a/Assets/Soundings/Runtime/VoyageMap.cs.meta b/Assets/Soundings/Runtime/VoyageMap.cs.meta new file mode 100644 index 0000000..dc79e21 --- /dev/null +++ b/Assets/Soundings/Runtime/VoyageMap.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 9cc64b45be7d86579a2f71999064a145 \ No newline at end of file diff --git a/Assets/Soundings/Runtime/VoyagePresentation.cs b/Assets/Soundings/Runtime/VoyagePresentation.cs index 75c5cb3..889c869 100644 --- a/Assets/Soundings/Runtime/VoyagePresentation.cs +++ b/Assets/Soundings/Runtime/VoyagePresentation.cs @@ -19,7 +19,9 @@ namespace Soundings if (Input.GetKeyDown(KeyCode.Escape)) { - if (title && pendingStart.HasValue) + if (!paused && underway != null && voyageMapOpen) + ToggleVoyageMap(); + else if (title && pendingStart.HasValue) { pendingStart = null; Render(); @@ -62,6 +64,8 @@ namespace Soundings private void UpdateActivePassage() { float delta = Time.unscaledDeltaTime; + if (Input.GetKeyDown(KeyCode.M)) + ToggleVoyageMap(); if (Input.GetKeyDown(KeyCode.H) && (passageBridge || passageHelm.Manual)) ToggleHelm(); @@ -76,6 +80,7 @@ namespace Soundings } passageHelm.Advance(delta * passageSpeed, rudder, livePassage.SpeedFactor, underway.Weather); float progress = passageHelm.Progress; + UpdatePortApproach(); bool performanceWasActive = livePassage.PerformanceActive; livePassage.AdvanceTo(progress); if (!performanceWasActive && livePassage.PerformanceActive) @@ -139,6 +144,18 @@ namespace Soundings UpdateHelmControls(); UpdateStationInteractions(); UpdateAnnouncement(); + UpdateVoyageMap(); + } + + private void UpdatePortApproach() + { + if (passageAudio.ApproachSent || passageHelm.Arrived) + return; + + float usualApproach = Mathf.Clamp(PassageDuration(underway) * .17f, 18f, 44f); + float speakingTime = (passageAudio.ApproachSeconds + 1.2f) * passageSpeed * livePassage.SpeedFactor; + if (passageHelm.RemainingSeconds <= Mathf.Max(usualApproach, speakingTime)) + passageAudio.AnnounceApproach(); } private void TurnPassageCamera(float delta) => @@ -199,6 +216,7 @@ namespace Soundings passageSpeed = 1; passageDeck = passageServiceArea = -1; passageBridge = passageExploring = false; + voyageMapOpen = false; stationFeedbackText = null; passageBusinessOpen = true; SetPassageFreeLook(false); @@ -208,7 +226,7 @@ namespace Soundings harbor.BeginPassage(quote.Weather, PassageDuration(quote)); harbor.ShowDeck(passageDeck); harbor.UpdatePassengers(livePassage, 0); - passageAudio.Begin(); + passageAudio.Begin(quote.Destination); Render(); } @@ -289,6 +307,7 @@ namespace Soundings livePassage = null; passageHelm = null; passageServiceArea = -1; + voyageMapOpen = false; passageAudio.End(); serviceReadout = null; SetPassageFreeLook(false); @@ -303,7 +322,12 @@ namespace Soundings page = 4; ReviewGuideVoyage(); } - Apply(failure, $"Arrived in {Market.Ports[voyage.Destination].Name}."); + string arrival = $"Arrived in {Market.Ports[voyage.Destination].Name}."; + if (failure == null && voyage.ItineraryLeg > 0) + arrival += Ship.Itinerary is { HasNext: true } itinerary + ? $" Next call is {Market.Ports[itinerary.NextPort].Name}." + : " Itinerary complete."; + Apply(failure, arrival); } } } diff --git a/Docs/Design.md b/Docs/Design.md index 954146e..3af635e 100644 --- a/Docs/Design.md +++ b/Docs/Design.md @@ -12,6 +12,8 @@ The prototype covers 22 ports. A global loop continues from Lisbon through the M The optional first-voyage guide responds to the current ship and workspace. The used-ship start can go straight to a route and fare. The financed start can commission a hull, fit passenger cabins and dining, and fuel the ship before departing. The guide ends in the Logbook. Players can skip it or restart it for their current fleet. +Set an itinerary by adding connected calls on the Chart. Each ship keeps its own ordered stops. Departures use the current leg's fare and passenger forecast, and each arrival settles that leg and saves the next call. In port, review the Logbook and prepare fuel and orders before casting off again. The live voyage map shows all calls and the simulated ship position and heading. Destination-specific PA recordings name the next call on departure and approach. + ## Economy model | Decision | Simulation effect | diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index c30abee..3f85562 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -149,7 +149,7 @@ PlayerSettings: loadStoreDebugModeEnabled: 0 visionOSBundleVersion: 1.0 tvOSBundleVersion: 1.0 - bundleVersion: 0.5.0 + bundleVersion: 0.6.0 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 diff --git a/README.md b/README.md index b691117..231edb7 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ The optional **First voyage guide** starts enabled for both careers. It highligh ## During a voyage +- For a multi-stop voyage, open **Itinerary** on the Chart and append connected ports in order. Each leg has its own forecast, local fuel and provisions, and arrival statement. After docking, choose **Plan next leg** in the Logbook to review and prepare for the next call. The ship's itinerary stays in the save at each berth. - Short routes take about two minutes at **1×**. Longer crossings take up to six minutes. Use **2×**, **4×**, or **Skip to arrival** to advance faster. Planning, the passage clock, and service activity pause together with **Esc**. - Drag or use **Q/E** to orbit the ship. Scroll to zoom and press **Home** to reset the camera. Use **0** for the exterior and **1–8** to select available decks. - Choose **Bridge** (**B**) for the forward view or **Explore** (**V**) to walk the selected deck. Walk with **WASD**, hold the right mouse button to look, or turn with **Q/E**. Walls and furniture block movement, and open doorways connect the rooms. **Service deck** opens the engine room, galley, stores, maintenance shop, freshwater plant, and sewage treatment. @@ -25,7 +26,8 @@ The optional **First voyage guide** starts enabled for both careers. It highligh - On the bridge, choose **Take the helm** (**H**). Use **A/D** for the rudder and **W/S** to step through throttle orders. The ship gathers speed, coasts, and takes time to turn. Press **H** again to resume autopilot. The exterior view lets you watch the ship respond while you steer. - Onboard prices apply to future service while passenger bookings stay fixed for the crossing. Limited-time specials and event decisions affect service, takings, and the arrival report. - Dockside orders lock at cast off and appear itemized on arrival. Food runs down as meals are served. Paid acts run during their booked service window and add show places and demand. -- The ship's PA welcomes guests at cast off and announces selected specials, extra service, and performances. Spoken announcements have matching captions. +- Press **M** or choose **Voyage map** at sea to see the ship's live position and heading, the current leg, and the rest of the itinerary. +- The ship's PA names the next port at cast off and again on approach. It also announces selected specials, extra service, and performances. Spoken announcements have matching captions. - Your first three Coastal voyages default to assisted operations. The crew can release reserve provisions and boost utilities. Choose **Operations: Assisted** at any service station to switch to manual operation. Later voyages default to manual operation with assisted mode still available. Use **Deck Plans → Ship systems** to fit additional capacity for longer or busier crossings. **Fetch live** uses the Open-Meteo current forecast at the route midpoint. The Chart shows the condition used for departure. Storms slow the crossing, close the pool, and shift some demand indoors. See the [Open-Meteo API and usage terms](https://open-meteo.com/en/terms).