Fix port cinematics and expand ship attractions
This commit is contained in:
@@ -5,7 +5,7 @@ namespace Soundings
|
||||
{
|
||||
public sealed partial class SoundingsApp
|
||||
{
|
||||
private static readonly string[] PassageServices = { "rooms", "meals", "drinks", "shows", "amenities", "retail" };
|
||||
private static readonly string[] PassageServices = { "rooms", "meals", "drinks", "shows", "amenities", "retail", "casino" };
|
||||
private readonly Label[] passageDemand = new Label[PassageServices.Length];
|
||||
private readonly Label[] passagePrices = new Label[PassageServices.Length];
|
||||
private readonly Button[] passageSpecials = new Button[PassageServices.Length];
|
||||
@@ -17,6 +17,7 @@ namespace Soundings
|
||||
private float renderedPassageProgress = -1, nextPassageReadout;
|
||||
private Button passageEventAccept;
|
||||
private string passageEventTitle;
|
||||
private Label casinoBalance;
|
||||
|
||||
private void DrawUnderway(VisualElement workspace)
|
||||
{
|
||||
@@ -138,6 +139,7 @@ namespace Soundings
|
||||
private void DrawPassageBusiness(VisualElement left)
|
||||
{
|
||||
var book = Add(left, "voyage-business-book");
|
||||
casinoBalance = null;
|
||||
var metrics = Add(book, "voyage-business-metrics");
|
||||
var happiness = Add(metrics, "voyage-business-metric");
|
||||
AddText(happiness, "GUEST HAPPINESS", "voyage-caption");
|
||||
@@ -152,7 +154,8 @@ namespace Soundings
|
||||
for (int i = 0; i < PassageServices.Length; i++)
|
||||
{
|
||||
OnboardService service = (OnboardService)i;
|
||||
if (service == OnboardService.Retail && Ship.RetailCapacity == 0)
|
||||
if (service == OnboardService.Retail && Ship.RetailCapacity == 0
|
||||
|| service == OnboardService.Casino && Ship.CasinoCapacity == 0)
|
||||
{
|
||||
passageDemand[i] = null;
|
||||
continue;
|
||||
@@ -164,6 +167,8 @@ namespace Soundings
|
||||
passageDemand[i] = AddText(line, "", "voyage-service-demand");
|
||||
if (service == OnboardService.Shows && underway.Plan?.Program is EntertainmentProgram.LiveMusic or EntertainmentProgram.Headline)
|
||||
passagePerformance = AddText(entry, "", "voyage-service-included");
|
||||
if (service == OnboardService.Casino)
|
||||
casinoBalance = AddText(entry, "", "voyage-service-included");
|
||||
if (service == OnboardService.Amenities && underway.Weather == WeatherCondition.Storm)
|
||||
AddText(entry, "Outdoor venues closed", "voyage-service-included voyage-demand-short");
|
||||
if (service == OnboardService.Rooms)
|
||||
@@ -174,11 +179,11 @@ namespace Soundings
|
||||
|
||||
var prices = Add(entry, "voyage-price-row");
|
||||
passageMinus[i] = Action("−", () => AdjustPassagePrice(service, -1), "voyage-price-step", $"passage-price-{slug}-minus");
|
||||
passageMinus[i].tooltip = "Lower the onboard price by $1";
|
||||
passageMinus[i].tooltip = service == OnboardService.Casino ? "Lower the table stake by $1" : "Lower the onboard price by $1";
|
||||
prices.Add(passageMinus[i]);
|
||||
passagePrices[i] = AddText(prices, "", "voyage-service-price");
|
||||
passagePlus[i] = Action("+", () => AdjustPassagePrice(service, 1), "voyage-price-step", $"passage-price-{slug}-plus");
|
||||
passagePlus[i].tooltip = "Raise the onboard price by $1";
|
||||
passagePlus[i].tooltip = service == OnboardService.Casino ? "Raise the table stake by $1" : "Raise the onboard price by $1";
|
||||
prices.Add(passagePlus[i]);
|
||||
passageSpecials[i] = Action("Special −25%", () => StartPassageSpecial(service), "voyage-special", $"passage-special-{slug}");
|
||||
prices.Add(passageSpecials[i]);
|
||||
@@ -241,6 +246,8 @@ namespace Soundings
|
||||
SetPassageText(passageSales, Money(livePassage.Revenue));
|
||||
if (passagePerformance != null)
|
||||
SetPassageText(passagePerformance, livePassage.PerformanceLabel);
|
||||
if (casinoBalance != null)
|
||||
SetPassageText(casinoBalance, $"{Money(livePassage.Get(OnboardService.Casino).Revenue - livePassage.CasinoPayouts)} net after payouts");
|
||||
for (int i = 0; i < PassageServices.Length; i++)
|
||||
{
|
||||
if (passageDemand[i] == null)
|
||||
@@ -257,7 +264,7 @@ namespace Soundings
|
||||
SetPassageText(passagePrices[i], ticks > 0 ? Money(Mathf.Max(1, price * 3 / 4)) : Money(price));
|
||||
passageMinus[i].SetEnabled(price > 0 && demand.Capacity > 0);
|
||||
passagePlus[i].SetEnabled(demand.Capacity > 0);
|
||||
string offer = ticks > 0 ? $"Special · {ticks} left" : "Special −25%";
|
||||
string offer = ticks > 0 ? $"Special · {ticks} left" : service == OnboardService.Casino ? "Low-stakes hour" : "Special −25%";
|
||||
if (passageSpecials[i].text != offer)
|
||||
passageSpecials[i].text = offer;
|
||||
passagePrices[i].tooltip = ticks > 0 ? $"Regular price: {Money(price)}" : "";
|
||||
|
||||
Reference in New Issue
Block a user