Add manual port pilotage and working bridge instruments

Scale docking momentum by hull, require manual mooring and channel maneuvers in Captain Career, and add rank-specific bridge instruments and voiced training.
This commit is contained in:
josh
2026-11-29 21:34:36 -05:00
parent 290e4cb45d
commit 86ee1b99bf
57 changed files with 2454 additions and 62 deletions

View File

@@ -797,16 +797,23 @@ namespace BigShipTycoon
}
float stationOffset = extent * .66f;
BridgeConsole(geometry, walk, new Vector3(x + 1.39f, y, 0), 2.27f, 0);
bool river = ship.HullIndex == Market.River;
bool advanced = ship.HullIndex is Market.Ocean or Market.Mega;
DockInstrumentKind navigation = river ? DockInstrumentKind.Compass : DockInstrumentKind.Radar;
BridgeConsole(geometry, walk, layout.Room.transform, new Vector3(x + 1.39f, y, 0), 2.27f, 0,
DockInstrumentKind.Conning, navigation, true);
layout.Stations.Add(new ShipStation(StationKind.Helm, new Vector3(x + .38f, y + 1.40f, 0)));
BridgeConsole(geometry, walk, new Vector3(x + 1.83f, y, -stationOffset), 1.72f, 1);
BridgeConsole(geometry, walk, new Vector3(x + 1.83f, y, stationOffset), 1.72f, 2);
BridgeConsole(geometry, walk, layout.Room.transform, new Vector3(x + 1.83f, y, -stationOffset), 1.72f, 1,
DockInstrumentKind.Repeater, advanced ? DockInstrumentKind.Approach : DockInstrumentKind.Conning);
BridgeConsole(geometry, walk, layout.Room.transform, new Vector3(x + 1.83f, y, stationOffset), 1.72f, 2,
DockInstrumentKind.Machinery, river ? DockInstrumentKind.Compass : DockInstrumentKind.Repeater);
if (ship.HasAftTerrace)
{
for (int side = -1; side <= 1; side += 2)
{
float stationZ = side * extent * .32f;
BridgeConsole(geometry, walk, new Vector3(x + 2.18f, y, stationZ), 2.48f, side > 0 ? 1 : 0);
BridgeConsole(geometry, walk, layout.Room.transform, new Vector3(x + 2.18f, y, stationZ), 2.48f, side > 0 ? 1 : 0,
side > 0 ? DockInstrumentKind.Machinery : DockInstrumentKind.Radar, DockInstrumentKind.Approach);
geometry.Box(Carpet, new Vector3(x + .13f, y + .042f, stationZ), new Vector3(2f, .018f, 2.43f));
geometry.Box(Gasket, new Vector3(x + 2.58f, y + 2.34f, stationZ), new Vector3(.10f, .34f, 2.57f));
PlaceSign(layout.Room.transform, side < 0 ? "ROUTE MONITOR" : "ENGINE CONTROL", new Vector3(x + 2.524f, y + 2.34f, stationZ), 90, .09f);
@@ -826,7 +833,8 @@ namespace BigShipTycoon
return layout;
}
private static void BridgeConsole(Geometry shape, ShipWalkSpace walk, Vector3 origin, float width, int style)
private void BridgeConsole(Geometry shape, ShipWalkSpace walk, Transform parent, Vector3 origin, float width, int style,
DockInstrumentKind port, DockInstrumentKind starboard, bool helm = false)
{
void Box(int paint, float x, float y, float z, float d, float h, float w)
=> shape.Box(paint, origin + new Vector3(x, y, z), new Vector3(d, h, w));
@@ -842,14 +850,27 @@ namespace BigShipTycoon
Box(Gasket, .34f, 1.302f, z, .20f, .47f, width * .402f);
Vector3 screen = origin + new Vector3(.234f, 1.308f, z);
BridgeScreen(shape, screen, .36f, width * .353f, (style + (i > 0 ? 1 : 0)) % 3);
dockMonitors.Add((parent, screen, .35f, width * .350f, i > 0 ? starboard : port));
Box(Alloy, .354f, 1.557f, z, .24f, .030f, width * .41f);
for (int key = 0; key < 5; key++)
Box(key == 3 ? ScreenAmber : ScreenChart, -.26f + key * .042f, 1.093f,
z - width * .11f, .022f, .016f, .047f);
}
Box(DisplayDark, -.19f, 1.09f, 0, .30f, .030f, .29f);
Box(Alloy, -.09f, 1.211f, 0, .036f, .215f, .036f);
Box(ScreenAmber, -.11f, 1.33f, 0, .09f, .074f, .12f);
if (helm)
{
bridgeTelegraph = Piece("Engine order telegraph lever", parent).transform;
bridgeTelegraph.localPosition = origin + new Vector3(-.09f, 1.10f, 0);
var lever = new Geometry(this, bridgeTelegraph);
lever.Box(Alloy, new Vector3(0, .11f, 0), new Vector3(.036f, .215f, .036f));
lever.Box(ScreenAmber, new Vector3(-.02f, .23f, 0), new Vector3(.09f, .074f, .12f));
lever.Finish();
}
else
{
Box(Alloy, -.09f, 1.211f, 0, .036f, .215f, .036f);
Box(ScreenAmber, -.11f, 1.33f, 0, .09f, .074f, .12f);
}
Box(ScreenRed, -.35f, 1.112f, .151f, .066f, .047f, .065f);
}
@@ -1083,6 +1104,7 @@ namespace BigShipTycoon
public void Dispose()
{
ReleaseDockDisplays();
passengerCrowd.Dispose();
foreach (Mesh mesh in meshes)
UnityEngine.Object.Destroy(mesh);