Make voyages active with dockside orders, crew calls, and ship PA
This commit is contained in:
@@ -6,9 +6,10 @@ namespace Soundings
|
||||
{
|
||||
public sealed partial class SoundingsApp
|
||||
{
|
||||
private void DrawVoyageFolio(VisualElement folio, Ship ship, Voyage quote)
|
||||
private void DrawVoyageFolio(VisualElement chart, VisualElement folio, Ship ship, Voyage quote)
|
||||
{
|
||||
PortSpec origin = Market.Ports[quote.Origin];
|
||||
PreparePortOrders(ship, quote);
|
||||
AddText(folio, $"DEPARTURE FROM {origin.Name.ToUpperInvariant()}", "chart-paper-kicker chart-paper-section");
|
||||
DrawWeatherPicker(folio, quote);
|
||||
var passage = Add(folio, "chart-passage");
|
||||
@@ -24,6 +25,7 @@ namespace Soundings
|
||||
ChartStepper(fares, Money(ship.Fare), "fare", () => ChangeFare(ship, -50), () => ChangeFare(ship, 50),
|
||||
ship.Fare > Market.MinFare, ship.Fare < Market.MaxFare);
|
||||
|
||||
DrawPortOrdersLink(folio, quote.Plan);
|
||||
DrawChartBunkering(folio, ship, quote);
|
||||
string blocker = company.DepartureBlock(ship, quote);
|
||||
if (!string.IsNullOrEmpty(blocker))
|
||||
@@ -36,6 +38,8 @@ namespace Soundings
|
||||
Button launch = Action("Cast off →", () => BeginVoyage(quote), "chart-ink-button chart-wide-button chart-cast-off", "dispatch");
|
||||
launch.SetEnabled(blocker == null);
|
||||
folio.Add(launch);
|
||||
if (portOrdersOpen)
|
||||
DrawPortOrders(chart, ship, quote);
|
||||
}
|
||||
|
||||
private void DrawChartBunkering(VisualElement folio, Ship ship, Voyage quote = null)
|
||||
|
||||
Reference in New Issue
Block a user