using System; using System.Collections; using System.IO; using UnityEngine; using UnityEngine.UIElements; namespace Soundings { public sealed partial class SoundingsApp { private IEnumerator VisualSmoke() { string[] args = Environment.GetCommandLineArgs(); int index = Array.IndexOf(args, "-soundings-smoke"); if (index + 1 >= args.Length) { Application.Quit(1); yield break; } string directory = args[index + 1]; Directory.CreateDirectory(directory); yield return CaptureSmoke(directory, "01-title"); if (!CheckSmoke(guidedCareer, "The guide is on by default") || !SubmitSmoke("guide-toggle") || !CheckSmoke(!guidedCareer, "Guide can be turned off at title") || !SubmitSmoke("guide-toggle") || !SubmitSmoke("start-used") || !CheckSmoke(Ship?.Name == "MV Meridian" && guideContext == GuideStep.SetCourse, "Guided used start")) yield break; yield return CaptureSmoke(directory, "02-harbor"); if (!SubmitSmoke("plan-voyage") || !CheckSmoke(page == 3 && destination == 1 && guideContext == GuideStep.Fare, "Set course and fare guide")) yield break; yield return CaptureSmoke(directory, "03-passage-chart"); int fare = Ship.Fare; if (!SubmitSmoke("fare-plus") || !CheckSmoke(Ship.Fare == fare + 50 && guideContext == GuideStep.CastOff, "Fare control and departure guide")) yield break; if (!SubmitSmoke("weather-swell") || !CheckSmoke(PassageWeatherFor(0, 1) == WeatherCondition.Swell, "Select forecast conditions") || !SubmitSmoke("weather-calm")) yield break; if (!SubmitSmoke("dispatch") || !CheckSmoke(underway != null && livePassage != null && Ship.Port == 0 && company.Voyages == 0 && PassageDuration(underway) >= 120 && livePassage.Assisted && underway.Weather == WeatherCondition.Calm && guideContext == GuideStep.AtSea && root.Q