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

@@ -15,6 +15,7 @@ namespace BigShipTycoon.Editor
VerifySunDeckRefit();
VerifyPlacedSunDeckFittings();
VerifyFlagshipCampaign();
VerifyMegaLiner();
VerifyLiveCrossingSettlement();
VerifyConcurrentSettlement();
VerifyStormAndShipSystems();
@@ -22,7 +23,77 @@ namespace BigShipTycoon.Editor
VerifyPortOrders();
VerifyMultiStopItinerary();
VerifyShoreExcursions();
Debug.Log("Big Ship Tycoon economy verification passed for both starts, pricing, fuel, venue and sun deck refits, 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 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.");
}
private static void VerifyMegaLiner()
{
HullSpec hull = Market.Hulls[Market.Mega];
Company company = Company.Start(false);
company.Cash = 9_000_000;
company.Voyages = hull.Voyages;
company.Reputation = hull.Reputation;
int available = company.AvailableCash;
Require(company.Acquire(Market.Mega, false, "Horizon Crown") != null && company.AvailableCash == available,
"a liner commission needs the completed flagship charter even with the required voyage count, reputation, and cash");
company.Flagship = true;
company.Voyages--;
Require(company.ShipyardBlock(Market.Mega, false) != null, "the liner checks completed voyages after the charter");
company.Voyages++;
company.Reputation--;
Require(company.ShipyardBlock(Market.Mega, false) != null, "the liner also checks reputation after the charter");
company.Reputation++;
Require(company.ShipyardBlock(Market.Mega, true) != null, "the liner can only be commissioned new");
Require(company.Acquire(Market.Ocean, false, "North Star") == null, "prepare an Ocean Class hull for the exclusive fitting checks");
Ship ocean = company.ActiveShip;
Require(company.Build(ocean, 0, 0, Facility.SkyResidence) != null && company.Build(ocean, 0, 0, Facility.ProductionGalley) != null,
"Ocean Class cannot fit either a MEGA guest venue or utility");
int beforeCommission = company.Cash;
Require(company.Acquire(Market.Mega, false, "Horizon Crown") == null && company.Cash == beforeCommission - hull.Price,
"unlocked liner commission charges the advertised price once");
Ship ship = company.ActiveShip;
Require(ship.Decks.Count == 12 && hull.MaxDecks == 15 && hull.Length >= 300 && hull.Beam >= 48
&& ship.Decks[0].Cells.Length == 64 && ship.DailyPayroll > ocean.DailyPayroll && ship.Tank > ocean.Tank,
"the liner is longer, wider and taller with an appropriately larger tank and crew complement");
Require(company.AddDeck(ship) == null && company.AddDeck(ship) == null && company.AddDeck(ship) == null
&& ship.Decks.Count == 15 && company.AddDeck(ship) != null, "the liner expands to its own deck limit");
int tank = ship.Tank, galley = ship.GalleyCapacity, stores = ship.FoodCapacity;
int water = ship.WaterCapacity, waterOutput = ship.WaterProduction, waste = ship.WasteCapacity, wasteOutput = ship.WasteTreatment;
var fittings = new[] { Facility.SkyResidence, Facility.MarketHall, Facility.OceanArena, Facility.BunkerFarm, Facility.PanoramaClub,
Facility.ThermalSpa, Facility.ProductionGalley, Facility.ColdChain, Facility.MembranePlant, Facility.ReclamationPlant,
Facility.EngineeringCenter, Facility.Galleria, Facility.RoyalCasino, Facility.LaundryPlant };
for (int i = 0; i < fittings.Length; i++)
Require(company.Build(ship, i / 2, i % 2 * 6, fittings[i]) == null, $"fit {fittings[i]} on the liner");
Require(ship.Beds == 128 && ship.Meals == 840 && ship.Entertainment == 720 && ship.BarCapacity == 340
&& ship.PoolCapacity == 480 && ship.RetailCapacity == 590 && ship.CasinoCapacity == 640,
"each new guest facility adds its own service capacity");
Require(ship.Tank == tank + 320 && ship.GalleyCapacity == galley + 360 && ship.FoodCapacity == stores + 5400
&& ship.WaterCapacity == water + 60000 && ship.WaterProduction == waterOutput + 36000
&& ship.WasteCapacity == waste + 44000 && ship.WasteTreatment == wasteOutput + 40000,
"the enlarged utilities add fuel, provisions, cooking, water, and treatment headroom");
int afterFit = company.Cash;
Require(company.Build(ship, 0, 0, Facility.SkyResidence, 1) == null && company.Cash == afterFit
&& ship.Decks[0].FacilityAt(3 * hull.Columns + 1, hull.Columns) == Facility.SkyResidence,
"turn the residence through four rows without paying for it again");
Require(company.Refuel(ship, ship.Tank) == null && company.Build(ship, 1, 6, Facility.Empty) != null,
"a full bunker farm cannot be removed while the remaining tanks would overflow");
ship.Fare = 600;
ship.Condition = 94;
Voyage quote = company.Forecast(ship, 1);
var voyage = new OnboardSession(ship, quote);
voyage.ServiceMachinery();
Require(quote.Guests > 0 && quote.SuiteGuests == quote.Guests && quote.SuitePremium == quote.Guests * 840
&& quote.Crew == ship.DailyPayroll * quote.Days && voyage.RepairCredit == 7 && voyage.LaundryCapacity > 558,
"a liner quote and live session use residence fares, crew payroll, laundry and engineering capacity");
Require(company.Sail(ship, 1, voyage) == null && ship.Port == 1, "settle a liner voyage through the ordinary ledger");
Company restored = JsonUtility.FromJson<Company>(JsonUtility.ToJson(company));
Require(restored.CanLoad() && restored.ActiveShip.HullIndex == Market.Mega && restored.ActiveShip.Decks.Count == 15
&& restored.ActiveShip.Decks[0].RotationAt(0) == 1 && restored.ActiveShip.CasinoCapacity == 640
&& restored.History[0].SuitePremium == quote.SuitePremium, "liner fittings, rotation and voyage accounts survive save and reload");
}
private static void VerifySunDeckRefit()

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.13.0";
PlayerSettings.bundleVersion = "0.14.0";
PlayerSettings.defaultScreenWidth = 1920;
PlayerSettings.defaultScreenHeight = 1080;
PlayerSettings.fullScreenMode = FullScreenMode.FullScreenWindow;