Animate passenger venues and add port-specific cinematics
This commit is contained in:
@@ -17,6 +17,17 @@ namespace Soundings
|
||||
if (root == null)
|
||||
return;
|
||||
|
||||
if (harbor.PortCinematicActive)
|
||||
{
|
||||
if (holdCinematicClock)
|
||||
return;
|
||||
if (Input.GetKeyDown(KeyCode.Escape))
|
||||
EndPortCinematic();
|
||||
else
|
||||
UpdatePortCinematic(Time.unscaledDeltaTime);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Escape))
|
||||
{
|
||||
if (!paused && underway != null && voyageMapOpen)
|
||||
@@ -227,7 +238,8 @@ namespace Soundings
|
||||
harbor.ShowDeck(passageDeck);
|
||||
harbor.UpdatePassengers(livePassage, 0);
|
||||
passageAudio.Begin(quote.Destination);
|
||||
Render();
|
||||
if (!StartPortCinematic(quote.Origin, false))
|
||||
Render();
|
||||
}
|
||||
|
||||
private void SelectPassageDeck(int index)
|
||||
@@ -297,12 +309,38 @@ namespace Soundings
|
||||
|
||||
private void FinishVoyage()
|
||||
{
|
||||
if (underway == null || paused)
|
||||
if (underway == null || paused || harbor.PortCinematicActive)
|
||||
return;
|
||||
Voyage voyage = underway;
|
||||
livePassage.AdvanceTo(1);
|
||||
string failure = company.Sail(Ship, voyage.Destination, livePassage);
|
||||
if (failure != null)
|
||||
{
|
||||
Notify(failure, true);
|
||||
CompleteDocking();
|
||||
return;
|
||||
}
|
||||
|
||||
ResetItinerary();
|
||||
selectedVoyage = 0;
|
||||
ledgerRecordOffset = 0;
|
||||
ledgerAccounts = false;
|
||||
page = 4;
|
||||
ReviewGuideVoyage();
|
||||
string arrival = $"Arrived in {Market.Ports[voyage.Destination].Name}.";
|
||||
if (voyage.ItineraryLeg > 0)
|
||||
arrival += Ship.Itinerary is { HasNext: true } itinerary
|
||||
? $" Next call is {Market.Ports[itinerary.NextPort].Name}."
|
||||
: " Itinerary complete.";
|
||||
Notify(arrival);
|
||||
Save();
|
||||
passageAudio.AnnounceApproach();
|
||||
if (!StartPortCinematic(voyage.Destination, true))
|
||||
CompleteDocking();
|
||||
}
|
||||
|
||||
private void CompleteDocking()
|
||||
{
|
||||
underway = null;
|
||||
livePassage = null;
|
||||
passageHelm = null;
|
||||
@@ -312,22 +350,7 @@ namespace Soundings
|
||||
serviceReadout = null;
|
||||
SetPassageFreeLook(false);
|
||||
harbor.EndPassage();
|
||||
|
||||
if (failure == null)
|
||||
{
|
||||
ResetItinerary();
|
||||
selectedVoyage = 0;
|
||||
ledgerRecordOffset = 0;
|
||||
ledgerAccounts = false;
|
||||
page = 4;
|
||||
ReviewGuideVoyage();
|
||||
}
|
||||
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);
|
||||
Render();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user