Make voyages active with dockside orders, crew calls, and ship PA

This commit is contained in:
josh
2026-11-27 23:14:38 -05:00
parent 7951e1c878
commit cc7620c431
71 changed files with 2723 additions and 233 deletions

View File

@@ -7,7 +7,7 @@ namespace Soundings
[Serializable]
public sealed class OnboardReport
{
public int Happiness, Health, Revenue, Expenses, Decisions, FuelBurn, Repair, Provisions, WaterPercent, SewagePercent;
public int Happiness, Health, Revenue, Expenses, Decisions, FuelBurn, Repair, Provisions, WaterPercent, SewagePercent, CrewCalls;
public int[] ServiceSales;
}
@@ -177,11 +177,13 @@ namespace Soundings
{
tick++;
AdvanceSystems();
AdvancePerformance();
if (openedAt >= 0 && tick >= openedAt + 6)
ResolveEvent(false);
if (openedAt < 0 && nextEvent < Events.Length && tick >= ticks * (nextEvent == 0 ? .23 : .59))
openedAt = tick;
Measure(true);
AdvanceCrewRequest();
}
if (tick >= ticks && openedAt >= 0)
ResolveEvent(false);
@@ -191,6 +193,7 @@ namespace Soundings
{
Happiness = Happiness,
Health = Health,
CrewCalls = CrewRequestsCompleted,
FuelBurn = ProjectedFuelBurn,
Repair = RepairCredit,
Provisions = ProvisionsRemaining,
@@ -215,9 +218,13 @@ namespace Soundings
bool featured = featuredService == i && tick <= eventBenefitUntil;
VoyageEvent? notice = CurrentEvent;
int rush = notice.HasValue && notice.Value.Service == i ? notice.Value.Surge : featured ? additionalCapacity / 2 : 0;
bool performance = i == (int)OnboardService.Shows && PerformanceActive;
if (performance)
rush += PortPlanning.ShowDemand(BookedProgram);
double indoorShift = Quote.Weather == WeatherCondition.Storm && (i == 2 || i == 3) ? 1.28 : 1;
int requested = Math.Min(Quote.Guests, rush + (int)Math.Round(Quote.Guests * BaseDemand[i] * appeal * wave * indoorShift));
int possible = ServiceCapacity(i, capacity[i] + (featured ? additionalCapacity : 0));
int extraSeats = performance ? PortPlanning.ShowSeats(BookedProgram) : 0;
int possible = ServiceCapacity(i, capacity[i] + extraSeats + (featured ? additionalCapacity : 0) + CrewServiceBoost(i));
int served = Math.Min(requested, possible);
if (collect)
@@ -239,7 +246,7 @@ namespace Soundings
if (collect)
{
UpdateHealth(mealFulfillment);
double target = 40 + 55 * fulfillment / ServiceKinds - (100 - health) * .28;
double target = Math.Min(100, 40 + 55 * fulfillment / ServiceKinds - (100 - health) * .28 + CrewSurveyBonus);
satisfaction = satisfaction * .77 + target * .23;
}
}