Add manual helm, grounded interiors, and taller ship classes

This commit is contained in:
josh
2026-11-27 22:44:09 -05:00
parent 33cdd6dfa7
commit 7951e1c878
29 changed files with 1745 additions and 429 deletions

View File

@@ -61,12 +61,54 @@ namespace Soundings
if (!SubmitSmoke("passage-deck-1") || !CheckSmoke(passageDeck == 1, "Inspect the second guest deck"))
yield break;
yield return CaptureSmoke(directory, "06-guest-deck");
if (!SubmitSmoke("passage-bridge") || !CheckSmoke(passageBridge, "Enter the first-person bridge"))
if (!SubmitSmoke("passage-bridge") || !CheckSmoke(passageBridge && harbor.FirstPersonPositionIsClear, "Enter the first-person bridge"))
yield break;
yield return CaptureSmoke(directory, "06a-bridge");
Vector3 bridgeEntry = harbor.FirstPersonPosition;
WalkSmoke(Vector2.up, 35);
float bridgeWalk = Vector3.Distance(bridgeEntry, harbor.FirstPersonPosition);
if (!CheckSmoke(bridgeWalk > 1 && bridgeWalk < 3 && harbor.FirstPersonPositionIsClear, "Bridge console blocks grounded movement")
|| !SubmitSmoke("passage-camera-reset") || !SubmitSmoke("helm-toggle")
|| !CheckSmoke(passageHelm.Manual, "Take physical control on the bridge"))
yield break;
passageHelm.Advance(8, 0, livePassage.SpeedFactor, underway.Weather);
float originalHeading = passageHelm.Heading;
for (int i = 0; i < 100; i++)
passageHelm.Advance(.1f, 1, livePassage.SpeedFactor, underway.Weather);
PresentVessel(.1f);
if (!CheckSmoke(passageHelm.Heading > originalHeading + 5 && passageHelm.Position.y > .3f, "Rudder changes the ship heading and track"))
yield break;
yield return CaptureSmoke(directory, "06a-manual-helm");
if (!SubmitSmoke("helm-order-0") || !CheckSmoke(passageHelm.PropulsionStopped, "Stop order at the helm"))
yield break;
float coastingSpeed = passageHelm.Speed;
passageHelm.Advance(.55f, 0, livePassage.SpeedFactor, underway.Weather);
if (!CheckSmoke(passageHelm.Speed > 0 && passageHelm.Speed < coastingSpeed, "Ship coasts when propulsion is stopped")
|| !SubmitSmoke("helm-toggle") || !CheckSmoke(!passageHelm.Manual && !passageHelm.PropulsionStopped, "Autopilot resumes propulsion"))
yield break;
if (!SubmitSmoke("passage-deck-0") || !SubmitSmoke("passage-explore")
|| !CheckSmoke(passageExploring && passageDeck == 0, "Explore inside the cabin deck")
|| !SubmitSmoke("passage-service") || !CheckSmoke(passageServiceArea == 0, "Enter engineering"))
|| !CheckSmoke(passageExploring && passageDeck == 0 && harbor.FirstPersonPositionIsClear, "Explore inside the cabin deck"))
yield break;
yield return CaptureSmoke(directory, "06a-cabin-corridor");
Vector3 corridorEntry = harbor.FirstPersonPosition;
WalkSmoke(Vector2.up, 9);
WalkSmoke(Vector2.right, 12);
Vector3 nearBulkhead = harbor.FirstPersonPosition;
if (!CheckSmoke(nearBulkhead.x > corridorEntry.x + 2 && Mathf.Abs(nearBulkhead.z - corridorEntry.z) < .8f,
"Cabin corridor is clear and bulkheads block sideways movement"))
yield break;
WalkSmoke(Vector2.up, 8);
WalkSmoke(Vector2.right, 6);
if (!CheckSmoke(Mathf.Abs(harbor.FirstPersonPosition.z - corridorEntry.z) > 1 && harbor.FirstPersonPositionIsClear,
"Walk into a cabin through its open doorway"))
yield break;
if (!SubmitSmoke("passage-service") || !CheckSmoke(passageServiceArea == 0 && harbor.FirstPersonPositionIsClear, "Enter engineering"))
yield break;
Vector3 serviceEntry = harbor.FirstPersonPosition;
WalkSmoke(Vector2.up, 38);
float serviceWalk = Vector3.Distance(serviceEntry, harbor.FirstPersonPosition);
if (!CheckSmoke(serviceWalk > 1.6f && serviceWalk < 5 && harbor.FirstPersonPositionIsClear, "Walk through an engineering doorway and stop at the machinery")
|| !SubmitSmoke("passage-camera-reset"))
yield break;
int cruiseBurn = livePassage.ProjectedFuelBurn;
if (!SubmitSmoke("service-engine-0") || !CheckSmoke(livePassage.ProjectedFuelBurn < cruiseBurn, "Economy throttle saves fuel")
@@ -83,9 +125,9 @@ namespace Soundings
yield break;
if (!SubmitSmoke("company-menu") || !CheckSmoke(paused, "Pause voyage"))
yield break;
float elapsed = passageElapsed;
Vector2 pausedPosition = passageHelm.Position;
yield return new WaitForSecondsRealtime(.15f);
if (!CheckSmoke(passageElapsed == elapsed, "Paused passage clock") || !SubmitSmoke("resume-game"))
if (!CheckSmoke(passageHelm.Position == pausedPosition, "Paused passage clock") || !SubmitSmoke("resume-game"))
yield break;
if (!SubmitSmoke("dock-now") || !CheckSmoke(Ship.Port == 1 && company.Voyages == 1 && page == 4 && guideContext == GuideStep.Review, "Arrival settles once and opens the guided log"))
yield break;
@@ -157,18 +199,56 @@ namespace Soundings
if (!SubmitSmoke("buy-fuel") || !CheckSmoke(Ship.Fuel > 0 && guideContext == GuideStep.Fare, "Bunkering and guide progress")
|| !SubmitSmoke("guide-skip") || !CheckSmoke(company.TutorialStep == 0, "Guide can be skipped"))
yield break;
company.Cash = 2_000_000;
company.Voyages = 10;
company.Reputation = 70;
if (!SubmitSmoke("nav-2") || !SubmitSmoke("yard-2") || !SubmitSmoke("buy-ship")
|| !CheckSmoke(Ship.HullIndex == 1 && Ship.Decks.Count == 4, "Regional hull is delivered with four decks")
|| !SubmitSmoke("nav-0"))
yield break;
yield return CaptureSmoke(directory, "15-regional-hull");
if (!SubmitSmoke("nav-2") || !SubmitSmoke("yard-4"))
yield break;
TextField vesselName = root.Q<TextField>("vessel-name");
if (!CheckSmoke(vesselName != null, "Name the Ocean Class commission"))
yield break;
vesselName.value = "Crownhaven";
if (!SubmitSmoke("buy-ship")
|| !CheckSmoke(Ship.HullIndex == Market.Ocean && Ship.Decks.Count == 6, "Ocean Class is delivered with six decks")
|| !SubmitSmoke("add-deck") || !SubmitSmoke("add-deck")
|| !CheckSmoke(Ship.Decks.Count == 8, "Ocean Class can add two more decks"))
yield break;
if (!CheckSmoke(company.Build(Ship, 0, 0, Facility.Cabin) == null
&& company.Build(Ship, 1, 0, Facility.Dining) == null && company.Build(Ship, 7, 0, Facility.Bar) == null
&& company.Refuel(Ship, 100) == null, "Fit and fuel the largest hull") || !SubmitSmoke("nav-0"))
yield break;
yield return CaptureSmoke(directory, "16-ocean-class-hull");
if (!SubmitSmoke("plan-voyage") || !SubmitSmoke("port-1") || !SubmitSmoke("dispatch")
|| !SubmitSmoke("passage-deck-7") || !CheckSmoke(passageDeck == 7, "Select the eighth deck during the voyage"))
yield break;
yield return CaptureSmoke(directory, "17-ocean-class-cutaway");
if (!SubmitSmoke("passage-explore") || !CheckSmoke(harbor.FirstPersonPositionIsClear, "Walk safely on the eighth deck"))
yield break;
Debug.Log($"Soundings player smoke passed at {Screen.width} × {Screen.height}.");
Application.Quit(0);
}
private void MovePassageToSmoke(float progress)
{
passageElapsed = PassageDuration(underway) * progress;
passageHelm.SetProgress(progress);
livePassage.AdvanceTo(progress);
harbor.SetPassage(progress);
PresentVessel(0);
UpdatePassageUi(progress);
}
private void WalkSmoke(Vector2 movement, int steps)
{
for (int i = 0; i < steps; i++)
harbor.Walk(movement, .1f, true);
}
private bool SubmitSmoke(string element)
{
Button button = root.Q<Button>(element);