Enable placeable sun deck attractions and finish project rebrand

This commit is contained in:
josh
2026-11-28 20:33:30 -05:00
parent 56fafba6d9
commit ce0d38c8de
352 changed files with 1523 additions and 552 deletions

View File

@@ -1,7 +1,7 @@
using System;
using UnityEngine;
namespace Soundings.Editor
namespace BigShipTycoon.Editor
{
public static class EconomyVerification
{
@@ -13,6 +13,7 @@ namespace Soundings.Editor
VerifyMultiBerthFacilities();
VerifyRotatableFacilities();
VerifySunDeckRefit();
VerifyPlacedSunDeckFittings();
VerifyFlagshipCampaign();
VerifyLiveCrossingSettlement();
VerifyConcurrentSettlement();
@@ -51,6 +52,77 @@ namespace Soundings.Editor
"a small hull cannot install a roller coaster or spend money attempting it");
}
private static void VerifyPlacedSunDeckFittings()
{
Company company = Company.Start(false);
Ship coastal = company.ActiveShip;
int startingCash = company.Cash;
Require(company.PlaceSunDeck(coastal, new SunDeckPlacement(SunAttraction.RollerCoaster, 1, 1)) != null
&& company.Cash == startingCash && !coastal.SunDeckPlan.CustomLayout, "the coaster stays locked on a Coastal ship");
company.Cash = 2_000_000;
company.Reputation = 70;
company.Voyages = 12;
Require(company.Acquire(Market.Ocean, false, "Seabreeze") == null, "commission a ship for a multi-attraction sun deck");
Ship ship = company.ActiveShip;
Require(company.AddDeck(ship) == null && company.AddDeck(ship) == null, "test the final sun deck on the expanded hull");
int beforeFit = company.Cash;
SunDeckPlacement coaster = FindFreeSunFitting(company, ship, SunAttraction.RollerCoaster);
company.Cash = 0;
Require(company.PlaceSunDeck(ship, coaster) != null && company.Cash == 0 && !ship.SunDeckPlan.CustomLayout,
"an otherwise valid coaster needs funds before changing the layout");
company.Cash = beforeFit;
Require(company.PlaceSunDeck(ship, coaster) == null, "fit the coaster on the sun deck");
SunDeckPlacement pool = FindFreeSunFitting(company, ship, SunAttraction.Pool, rotation: 1, startFromBow: true);
Require(company.PlaceSunDeck(ship, pool) == null, "fit a rotated pool alongside the coaster");
SunDeckPlacement golf = FindFreeSunFitting(company, ship, SunAttraction.MiniGolf, mustTurn: true);
Require(company.PlaceSunDeck(ship, golf) == null, "fit mini golf alongside the coaster and pool");
Require(ship.SunDeckPlan.CustomLayout && ship.SunDeckPlan.Placements is { Length: 3 }
&& ship.PoolCapacity == 124 + 42 + 52 && company.Cash == beforeFit - 145000 - 9500 - 16000,
"three outdoor venues add their own capacities and each charge once");
int afterFit = company.Cash;
var overlap = new SunDeckPlacement(SunAttraction.MiniGolf, coaster.Column, coaster.Row);
Require(company.PlaceSunDeck(ship, overlap) != null && company.Cash == afterFit && ship.SunDeckPlan.Placements.Length == 3,
"overlapping footprints leave the balance and layout alone");
int golfIndex = Array.FindIndex(ship.SunDeckPlan.Placements, item => item.Kind == SunAttraction.MiniGolf);
golf.Rotation = 1;
Require(company.PlaceSunDeck(ship, golf, golfIndex) == null && company.Cash == afterFit && ship.PoolCapacity == 124 + 42 + 52,
"turn an existing mini golf course without buying it again");
Company restored = JsonUtility.FromJson<Company>(JsonUtility.ToJson(company));
SunDeckPlacement[] fittings = restored.ActiveShip.SunDeckPlan.Placements;
Require(restored.CanLoad() && fittings is { Length: 3 }
&& Array.Exists(fittings, fitting => fitting.Equals(coaster))
&& Array.Exists(fittings, fitting => fitting.Equals(pool))
&& Array.Exists(fittings, fitting => fitting.Equals(golf)), "all three placements and rotations survive serialization");
Require(restored.RemoveSunDeck(restored.ActiveShip, Array.FindIndex(fittings, fitting => fitting.Equals(golf))) == null
&& restored.ActiveShip.PoolCapacity == 124 + 42 && restored.Cash == afterFit + 16000 / 4,
"removing mini golf refunds once and leaves the pool and coaster in service");
}
private static SunDeckPlacement FindFreeSunFitting(Company company, Ship ship, SunAttraction kind,
int rotation = 0, bool startFromBow = false, bool mustTurn = false)
{
int columns = Mathf.CeilToInt(ship.Hull.Length / 3f);
int rows = Mathf.CeilToInt(ship.Hull.Beam / 3f);
for (int step = 0; step < columns; step++)
{
int column = startFromBow ? columns - step - 1 : step;
for (int row = 0; row < rows; row++)
{
var placement = new SunDeckPlacement(kind, column, row, rotation);
if (company.SunDeckPlacementBlock(ship, placement) == null && (!mustTurn
|| company.SunDeckPlacementBlock(ship, new SunDeckPlacement(kind, column, row, rotation + 1)) == null))
return placement;
}
}
throw new InvalidOperationException($"Economy verification could not fit {kind} on {ship.Name}.");
}
private static void VerifyCrewAndLaundry()
{
Company company = Company.Start(false);

View File

@@ -6,11 +6,11 @@ using UnityEditor.Build.Reporting;
using UnityEditor.SceneManagement;
using UnityEngine;
namespace Soundings.Editor
namespace BigShipTycoon.Editor
{
public static class SoundingsBuild
public static class TycoonBuild
{
private const string ScenePath = "Assets/Soundings/Scenes/Soundings.unity";
private const string ScenePath = "Assets/BigShipTycoon/Scenes/BigShipTycoon.unity";
public static void Configure()
{
@@ -18,22 +18,22 @@ namespace Soundings.Editor
{
var scene = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene, NewSceneMode.Single);
if (!EditorSceneManager.SaveScene(scene, ScenePath))
throw new BuildFailedException("Could not save the Soundings scene.");
throw new BuildFailedException("Could not save the Big Ship Tycoon scene.");
}
EditorBuildSettings.scenes = new[] { new EditorBuildSettingsScene(ScenePath, true) };
PlayerSettings.companyName = "Soundings";
PlayerSettings.companyName = "Big Ship Tycoon";
PlayerSettings.productName = "Big Ship Tycoon";
PlayerSettings.bundleVersion = "0.12.0";
PlayerSettings.bundleVersion = "0.13.0";
PlayerSettings.defaultScreenWidth = 1920;
PlayerSettings.defaultScreenHeight = 1080;
PlayerSettings.fullScreenMode = FullScreenMode.FullScreenWindow;
PlayerSettings.resizableWindow = true;
PlayerSettings.runInBackground = true;
PlayerSettings.SetApplicationIdentifier(NamedBuildTarget.Standalone, "game.soundings.simulator");
PlayerSettings.SetApplicationIdentifier(NamedBuildTarget.Standalone, "game.bigshiptycoon.simulator");
PlayerSettings.SetScriptingBackend(NamedBuildTarget.Standalone, ScriptingImplementation.Mono2x);
PlayerSettings.WebGL.compressionFormat = WebGLCompressionFormat.Disabled;
PlayerSettings.WebGL.template = "PROJECT:Soundings";
PlayerSettings.WebGL.template = "PROJECT:BigShipTycoon";
AssetDatabase.SaveAssets();
}
@@ -48,9 +48,9 @@ namespace Soundings.Editor
private static void BuildTargetPlayer(BuildTarget target)
{
string output = Environment.GetEnvironmentVariable("SOUNDINGS_BUILD_PATH");
string output = Environment.GetEnvironmentVariable("BIG_SHIP_TYCOON_BUILD_PATH");
if (string.IsNullOrEmpty(output))
throw new BuildFailedException("Set SOUNDINGS_BUILD_PATH to the output file (native) or directory (WebGL).");
throw new BuildFailedException("Set BIG_SHIP_TYCOON_BUILD_PATH to the output file (native) or directory (WebGL).");
string directory = Path.GetDirectoryName(Path.GetFullPath(output));
Directory.CreateDirectory(directory);
BuildReport report = BuildPipeline.BuildPlayer(new BuildPlayerOptions

View File

Before

Width:  |  Height:  |  Size: 2.4 MiB

After

Width:  |  Height:  |  Size: 2.4 MiB

View File

Before

Width:  |  Height:  |  Size: 2.4 MiB

After

Width:  |  Height:  |  Size: 2.4 MiB

View File

Before

Width:  |  Height:  |  Size: 2.3 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

View File

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

Before

Width:  |  Height:  |  Size: 2.3 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

View File

Before

Width:  |  Height:  |  Size: 512 KiB

After

Width:  |  Height:  |  Size: 512 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 MiB

After

Width:  |  Height:  |  Size: 2.8 MiB

View File

Before

Width:  |  Height:  |  Size: 2.5 MiB

After

Width:  |  Height:  |  Size: 2.5 MiB

View File

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 2.6 MiB

View File

@@ -1,4 +1,4 @@
The Soundings shipboard announcements use original scripts synthesized offline with the af_heart voice from Kokoro-82M v1.0 by hexgrad. The Kokoro model is released under Apache 2.0. Only rendered announcement audio is included in Soundings.
The Big Ship Tycoon shipboard announcements use original scripts synthesized offline with the af_heart voice from Kokoro-82M v1.0 by hexgrad. The Kokoro model is released under Apache 2.0. Only rendered announcement audio is included in Big Ship Tycoon.
Model card and training-data credits
https://huggingface.co/hexgrad/Kokoro-82M

Some files were not shown because too many files have changed in this diff Show More