Fix port cinematics and expand ship attractions
This commit is contained in:
@@ -10,7 +10,7 @@ namespace Soundings
|
||||
private static readonly (int HullIndex, bool Used)[] Offers =
|
||||
{ (0, true), (0, false), (1, true), (1, false), (2, false) };
|
||||
|
||||
private enum DeckTools { GuestFacilities, LargerVenues, LeisureAndRetail, ShipSystems }
|
||||
private enum DeckTools { GuestFacilities, LargerVenues, LeisureAndRetail, ShipSystems, Gaming }
|
||||
private DeckTools deckTools;
|
||||
private int toolRotation;
|
||||
private Action refreshDeckPlacement;
|
||||
@@ -20,6 +20,7 @@ namespace Soundings
|
||||
private static readonly Facility[] ExpandedTools = { Facility.Suite, Facility.GrandSuite, Facility.Restaurant,
|
||||
Facility.GrandTheater, Facility.ResortPool, Facility.CocktailLounge, Facility.Empty };
|
||||
private static readonly Facility[] LeisureTools = { Facility.Shop, Facility.ShoppingArcade, Facility.Spa, Facility.WaterPark, Facility.Empty };
|
||||
private static readonly Facility[] CasinoTools = { Facility.CasinoLounge, Facility.Casino, Facility.GrandCasino, Facility.Empty };
|
||||
private static readonly Facility[] SystemsTools = { Facility.Galley, Facility.Stores, Facility.Water,
|
||||
Facility.Waste, Facility.Workshop, Facility.Empty };
|
||||
|
||||
@@ -46,20 +47,30 @@ namespace Soundings
|
||||
var heading = Add(titleBar, "ship-work-name");
|
||||
AddText(heading, "DECK PLANS", "work-caption");
|
||||
AddDisplay(heading, ship.Name, "ship-work-heading");
|
||||
AddText(heading, $"{ship.Hull.Name} hull · Deck {deckIndex + 1} of {ship.Decks.Count}", "ship-work-detail");
|
||||
string deckTitle = sunDeckEditing ? "Open-air sun deck" : $"Deck {deckIndex + 1} of {ship.Decks.Count}";
|
||||
AddText(heading, $"{ship.Hull.Name} hull · {deckTitle}", "ship-work-detail");
|
||||
|
||||
var deckControls = Add(titleBar, "work-deck-controls");
|
||||
var selector = Add(deckControls, "work-deck-selector");
|
||||
Button sunDeck = Action("Sun deck", () =>
|
||||
{
|
||||
sunDeckEditing = true;
|
||||
Notify(null);
|
||||
Render();
|
||||
}, "work-deck-tab", "sun-deck-open");
|
||||
sunDeck.EnableInClassList("work-selected", sunDeckEditing);
|
||||
selector.Add(sunDeck);
|
||||
for (int i = ship.Decks.Count - 1; i >= 0; i--)
|
||||
{
|
||||
int floor = i;
|
||||
Button level = Action($"Deck {i + 1}", () =>
|
||||
{
|
||||
deckIndex = floor;
|
||||
sunDeckEditing = false;
|
||||
Notify(null);
|
||||
Render();
|
||||
}, "work-deck-tab", $"deck-{i}");
|
||||
level.EnableInClassList("work-selected", deckIndex == i);
|
||||
level.EnableInClassList("work-selected", !sunDeckEditing && deckIndex == i);
|
||||
selector.Add(level);
|
||||
}
|
||||
int deckPrice = company.DeckPrice(ship);
|
||||
@@ -68,12 +79,22 @@ namespace Soundings
|
||||
{
|
||||
string failure = company.AddDeck(ship);
|
||||
if (failure == null)
|
||||
{
|
||||
deckIndex = ship.Decks.Count - 1;
|
||||
sunDeckEditing = false;
|
||||
}
|
||||
Apply(failure, "New deck ready to fit out.");
|
||||
}, "work-deck-add", "add-deck");
|
||||
add.SetEnabled(ship.Decks.Count < ship.Hull.MaxDecks && company.AvailableCash >= deckPrice);
|
||||
deckControls.Add(add);
|
||||
|
||||
if (sunDeckEditing)
|
||||
{
|
||||
refreshDeckPlacement = null;
|
||||
DrawSunDeckEditor(work, ship);
|
||||
return;
|
||||
}
|
||||
|
||||
var board = Add(work, "work-draft");
|
||||
board.generateVisualContent += context => DrawDeckOutline(context, ship.Hull.Columns);
|
||||
var markings = Add(board, "work-draft-markings");
|
||||
@@ -111,6 +132,8 @@ namespace Soundings
|
||||
else
|
||||
AddText(gauges, $"{ship.BarCapacity:N0} drink orders", "work-capacity");
|
||||
}
|
||||
else if (deckTools == DeckTools.Gaming)
|
||||
AddText(gauges, $"{ship.CasinoCapacity:N0} gaming seats", "work-capacity");
|
||||
else
|
||||
AddText(gauges, $"{ship.Tank:N0} t bunker capacity", "work-capacity");
|
||||
AddText(gauges, $"{ship.Capacity:N0} guests per sailing", "work-capacity work-capacity-emphasis");
|
||||
@@ -120,6 +143,7 @@ namespace Soundings
|
||||
AddBuildToolTab(toolMode, "Guest facilities", "facility-guests", DeckTools.GuestFacilities, Facility.Cabin);
|
||||
AddBuildToolTab(toolMode, "Larger venues", "facility-larger", DeckTools.LargerVenues, Facility.Suite);
|
||||
AddBuildToolTab(toolMode, "Leisure & retail", "facility-leisure", DeckTools.LeisureAndRetail, Facility.Shop);
|
||||
AddBuildToolTab(toolMode, "Casinos", "facility-casino", DeckTools.Gaming, Facility.CasinoLounge);
|
||||
AddBuildToolTab(toolMode, "Ship systems", "facility-systems", DeckTools.ShipSystems, Facility.Galley);
|
||||
FacilitySpec selectedSpec = Market.Facilities[(int)tool];
|
||||
if (selectedSpec.BayCount > 1)
|
||||
@@ -134,6 +158,7 @@ namespace Soundings
|
||||
{
|
||||
DeckTools.LargerVenues => ExpandedTools,
|
||||
DeckTools.LeisureAndRetail => LeisureTools,
|
||||
DeckTools.Gaming => CasinoTools,
|
||||
DeckTools.ShipSystems => SystemsTools,
|
||||
_ => GuestTools
|
||||
};
|
||||
@@ -489,6 +514,13 @@ namespace Soundings
|
||||
Segment(9,9,9,6,10,4,14,4,15,6,15,9);
|
||||
Line(8,15,16,15);
|
||||
break;
|
||||
case Facility.Casino:
|
||||
case Facility.CasinoLounge:
|
||||
case Facility.GrandCasino:
|
||||
Segment(5,10,11,4,20,13,14,19,5,10);
|
||||
Segment(4,12,12,21,15,20);
|
||||
Segment(11,10,13,8,15,11,13,14,11,10);
|
||||
break;
|
||||
case Facility.Galley:
|
||||
Segment(3,13,17,13,15,18,5,18,3,13);
|
||||
Line(17,13,22,11);
|
||||
|
||||
Reference in New Issue
Block a user