Add port-specific shore excursions and deck stack

This commit is contained in:
josh
2026-11-28 17:19:25 -05:00
parent c570a64840
commit a54f66cec9
28 changed files with 1270 additions and 31 deletions

View File

@@ -169,10 +169,23 @@ namespace Soundings
LogLine(statement, "Fuel expense", Money(-trip.FuelExpense));
LogLine(statement, "Loan interest", Money(-trip.LoanInterest));
LogLine(statement, "Principal repaid", Money(-trip.Principal));
if (trip.ShoreReport is ShoreReport shore)
{
LogLine(statement, $"Shore excursion sales · {shore.Guests:N0} guests", Money(shore.Revenue));
LogLine(statement, "Local operators", Money(-shore.OperatorCost));
if (shore.Resolution != ShoreLateResolution.None)
{
string response = shore.Resolution == ShoreLateResolution.Held ? "Held at berth" : "Onward transport";
LogLine(statement, $"{response} · {shore.LateGuests:N0} guests", Money(-shore.ExtraCost));
}
}
else if (trip.ShoreCallId > 0 && company.Fleet.Exists(ship => ship.ShoreCall?.CallId == trip.ShoreCallId))
AddText(statement, "Shore excursion accounts are still open.", "log-secondary");
var balances = Add(leaf, "log-totals");
LogLine(balances, "Net voyage profit", Money(trip.NetIncome), LogAmountColor(trip.NetIncome));
LogLine(balances, "Cash change on arrival", Money(trip.CashChange), LogAmountColor(trip.CashChange));
LogLine(balances, trip.ShoreReport != null ? "Cash change including shore call" : "Cash change on arrival",
Money(trip.CashChange), LogAmountColor(trip.CashChange));
}
private void DrawAccounts(VisualElement left, VisualElement right)