Add riverboat captain career and distinct ship classes

Add class-specific vessel geometry and sea motion, a guided helm qualification path, dockside sailing orders, and local excursions at all 24 ports.
This commit is contained in:
josh
2026-11-29 20:41:00 -05:00
parent 46624bf5ba
commit 290e4cb45d
67 changed files with 1783 additions and 301 deletions

View File

@@ -9,6 +9,7 @@ namespace BigShipTycoon.Editor
{
VerifyUsedStartAndProfit();
VerifyFinancedStartAndConstruction();
VerifyCaptainCareer();
VerifyHullDeckProgression();
VerifyMultiBerthFacilities();
VerifyRotatableFacilities();
@@ -23,7 +24,29 @@ namespace BigShipTycoon.Editor
VerifyPortOrders();
VerifyMultiStopItinerary();
VerifyShoreExcursions();
Debug.Log("Big Ship Tycoon economy verification passed for both starts, pricing, fuel, venue and sun deck refits, MEGA commissions and facilities, fleet settlements, saves, weather, ship systems, crew payroll, laundry, port orders, multi-stop itineraries and shore excursions.");
Debug.Log("Big Ship Tycoon economy verification passed for all starts, Captain Career, pricing, fuel, venue and sun deck refits, MEGA commissions and facilities, fleet settlements, saves, weather, ship systems, crew payroll, laundry, port orders, multi-stop itineraries and shore excursions.");
}
private static void VerifyCaptainCareer()
{
var previous = Company.Start(false);
Array.Resize(ref previous.Permits, Market.Brickell);
Require(previous.CanLoad() && previous.Permits.Length == Market.Ports.Count && !previous.IsCaptainCareer
&& previous.Forecast(previous.ActiveShip, Market.Brickell) == null, "earlier careers keep their permits and ocean routes");
var company = Company.StartCaptain();
Ship river = company.ActiveShip;
Require(company.CanLoad() && river.HullIndex == Market.River && river.Hull.Length == 32
&& river.Decks.Count == 1 && company.Forecast(river, 1) == null
&& company.Forecast(river, Market.Brickell).NetIncome > 0 && company.ShipyardBlock(Market.Coastal, true) != null,
"the river start sails profitable local routes and must earn Coastal command");
Require(company.Build(river, 0, 5, Facility.Suite) != null, "the riverboat cannot install Regional facilities");
Complete(company, river, Market.Brickell);
Complete(company, river, Market.Mangrove);
var resumed = JsonUtility.FromJson<Company>(JsonUtility.ToJson(company));
Require(resumed.CanLoad() && resumed.IsCaptainCareer && resumed.CommandVoyages(Market.River) == 2
&& resumed.HelmQualifications(Market.River) == 0 && resumed.ShipyardBlock(Market.Coastal, true) != null,
"ordinary river crossings persist without satisfying the practical helm requirement");
}
private static void VerifyMegaLiner()
@@ -264,10 +287,17 @@ namespace BigShipTycoon.Editor
for (int i = 0; i < Market.Ports.Count; i++)
{
var tours = ShoreExcursions.Catalog(i);
Require(tours.Count == 2, "two distinct local shore tours at " + Market.Ports[i].Name);
Require(tours.Count == 3, "three distinct local shore tours at " + Market.Ports[i].Name);
foreach (ShoreTour tour in tours)
Require(names.Add(tour.Name) && tour.MinPrice < tour.StandardPrice && tour.StandardPrice < tour.MaxPrice,
"unique and priced shore tour " + tour.Name);
var route = new Voyage { Destination = i, Guests = 32, Weather = WeatherCondition.Calm };
ShoreBooking[] local = ShoreExcursions.Forecast(route, new[]
{
new ShoreOffer { Tour = 2, Price = tours[2].StandardPrice, Capacity = tours[2].MaxCapacity }
});
Require(local.Length == 1 && local[0].Tour == 2 && local[0].Guests > 0 && local[0].Revenue > local[0].OperatorCost,
"the third local excursion can be booked at " + Market.Ports[i].Name);
}
Company company = Company.Start(false);
@@ -291,12 +321,14 @@ namespace BigShipTycoon.Editor
offer.Capacity = catalog[1].MaxCapacity;
var indoor = new ShoreOffer { Tour = 0, Price = catalog[0].MinPrice, Capacity = catalog[0].MaxCapacity };
var studio = new ShoreOffer { Tour = 2, Price = catalog[2].MinPrice, Capacity = catalog[2].MaxCapacity };
quote.Weather = WeatherCondition.Calm;
int actualGuests = quote.Guests;
quote.Guests = 75;
ShoreBooking[] shared = ShoreExcursions.Forecast(quote, new[] { offer, indoor });
Require(shared[0].Guests > 0 && shared[1].Guests > 0 && shared[0].Guests + shared[1].Guests <= quote.Guests,
"multiple shore tours share a finite passenger pool");
ShoreBooking[] shared = ShoreExcursions.Forecast(quote, new[] { offer, indoor, studio });
Require(shared.Length == 3 && shared[0].Guests > 0 && shared[1].Guests > 0 && shared[2].Guests > 0
&& shared[0].Guests + shared[1].Guests + shared[2].Guests <= quote.Guests,
"all three shore tours share a finite passenger pool");
quote.Guests = actualGuests;
ShoreCall delayed = null, onTime = null;
@@ -601,6 +633,8 @@ namespace BigShipTycoon.Editor
for (int port = Market.StarterPortCount; port < Market.Ports.Count; port++)
{
if (Market.IsRiverPort(port))
continue;
Require(company.Permit(port) == null, "global port permit");
ship.Fare = 400 + 170 * company.Forecast(ship, port).Days;
Complete(company, ship, port);
@@ -744,6 +778,21 @@ namespace BigShipTycoon.Editor
&& stocked.Plan.FoodCost > light.Plan.FoodCost && stocked.Plan.ProgramCost > 0, "port food orders respect capacity and itemized costs");
Require(PortPlanning.FoodPriceCents(0, company.Day) != PortPlanning.FoodPriceCents(1, company.Day), "ports have different food prices");
Voyage economy = company.Forecast(ship, 1);
Voyage express = company.Forecast(ship, 1);
PortPlanning.Apply(ship, economy, company.Day, null, EntertainmentProgram.Shipboard, PassageOrder.Economy);
PortPlanning.Apply(ship, express, company.Day, null, EntertainmentProgram.Shipboard, PassageOrder.Express);
var economical = new OnboardSession(ship, economy);
var faster = new OnboardSession(ship, express);
Require(economy.RequiredFuel < light.RequiredFuel && express.RequiredFuel > light.RequiredFuel
&& economy.FuelExpense < light.FuelExpense && express.FuelExpense > light.FuelExpense
&& economical.EngineMode == 0 && faster.EngineMode == 2 && economical.SpeedFactor < faster.SpeedFactor,
"departure sailing orders change fuel requirements, costs and sailing speed");
economical.AdvanceTo(1);
faster.AdvanceTo(1);
Require(economical.Report().FuelBurn == economy.DepartureFuelBurn && faster.Report().FuelBurn == express.DepartureFuelBurn,
"steady sailing orders consume the planned fuel quantity");
var understocked = new OnboardSession(ship, light) { Assisted = false };
var provisioned = new OnboardSession(ship, stocked) { Assisted = false };
understocked.AdvanceTo(.5f);

View File

@@ -24,7 +24,7 @@ namespace BigShipTycoon.Editor
EditorBuildSettings.scenes = new[] { new EditorBuildSettingsScene(ScenePath, true) };
PlayerSettings.companyName = "Big Ship Tycoon";
PlayerSettings.productName = "Big Ship Tycoon";
PlayerSettings.bundleVersion = "0.14.0";
PlayerSettings.bundleVersion = "0.15.0";
PlayerSettings.defaultScreenWidth = 1920;
PlayerSettings.defaultScreenHeight = 1080;
PlayerSettings.fullScreenMode = FullScreenMode.FullScreenWindow;