Add MEGA Ocean Liner, split decks, and detailed ship materials

This commit is contained in:
josh
2026-11-28 21:02:42 -05:00
parent ce0d38c8de
commit 46624bf5ba
47 changed files with 2042 additions and 382 deletions

View File

@@ -11,6 +11,7 @@ namespace BigShipTycoon
private int passageSpeed = 1, passageDeck = -1, passageServiceArea = -1;
private bool passageFreeLook, passageCursorLocked;
private bool passageBridge, passageExploring;
private SunDeckZone? passageSunZone;
private void Update()
{
@@ -195,7 +196,9 @@ namespace BigShipTycoon
else if (passageBridge)
harbor.ViewBridge();
else if (passageExploring)
harbor.ExploreDeck(passageDeck);
harbor.ResetView();
else if (passageSunZone.HasValue)
harbor.FocusOutdoor(passageSunZone.Value);
else
harbor.ResetView();
}
@@ -203,7 +206,7 @@ namespace BigShipTycoon
ViewPassageBridge();
if (Input.GetKeyDown(KeyCode.V))
ExplorePassageDeck();
for (int i = 0; i <= Ship.Decks.Count; i++)
for (int i = 0; i <= Mathf.Min(9, Ship.Decks.Count); i++)
{
if (Input.GetKeyDown((KeyCode)((int)KeyCode.Alpha0 + i)))
{
@@ -292,8 +295,9 @@ namespace BigShipTycoon
private void SelectPassageDeck(int index)
{
if (underway == null || index < -1 || index >= Ship.Decks.Count ||
(passageDeck == index && !passageBridge && !passageExploring && passageServiceArea < 0))
(passageDeck == index && !passageSunZone.HasValue && !passageBridge && !passageExploring && passageServiceArea < 0))
return;
passageSunZone = null;
passageDeck = index;
if (index >= 0)
ReleaseHelm();
@@ -304,6 +308,18 @@ namespace BigShipTycoon
Render();
}
private void ViewPassageSunDeck(SunDeckZone zone)
{
if (underway == null || !Ship.HasAftTerrace)
return;
ReleaseHelm();
passageDeck = passageServiceArea = -1;
passageBridge = passageExploring = false;
passageSunZone = zone;
harbor.FocusOutdoor(zone);
Render();
}
private void ViewPassageBridge()
{
if (underway == null)
@@ -312,6 +328,7 @@ namespace BigShipTycoon
passageBusinessOpen = false;
passageBridge = true;
passageExploring = false;
passageSunZone = null;
passageDeck = passageServiceArea = -1;
harbor.ViewBridge();
Render();
@@ -321,13 +338,20 @@ namespace BigShipTycoon
{
if (underway == null)
return;
if (passageDeck < 0)
if (passageDeck < 0 && !passageSunZone.HasValue)
passageDeck = Ship.Decks.Count - 1;
ReleaseHelm();
passageBridge = false;
passageExploring = true;
passageServiceArea = -1;
harbor.ExploreDeck(passageDeck);
if (passageSunZone.HasValue)
{
passageExploring = harbor.ExploreOutdoor(passageSunZone.Value);
if (!passageExploring)
Notify("Leave a clear path on this outdoor deck to explore it.", true);
}
else
harbor.ExploreDeck(passageDeck);
Render();
}
@@ -340,6 +364,7 @@ namespace BigShipTycoon
ReleaseHelm();
passageBridge = false;
passageExploring = true;
passageSunZone = null;
passageDeck = -1;
passageServiceArea = index;
harbor.ExploreServiceArea(index);