Make voyages active with dockside orders, crew calls, and ship PA

This commit is contained in:
josh
2026-11-27 23:14:38 -05:00
parent 7951e1c878
commit cc7620c431
71 changed files with 2723 additions and 233 deletions

View File

@@ -27,6 +27,21 @@ namespace Soundings
public bool CanStand(Vector3 position) => CanStand(Plan(position));
internal bool HasSightLine(Vector3 from, Vector3 to)
{
Vector2 origin = Plan(from);
Vector2 line = Plan(to) - origin;
float limit = 1 - .12f / Mathf.Max(.12f, line.magnitude);
foreach (Rect obstacle in solids)
{
Rect surface = Rect.MinMaxRect(obstacle.xMin + BodyRadius, obstacle.yMin + BodyRadius,
obstacle.xMax - BodyRadius, obstacle.yMax - BodyRadius);
if (Sweep(origin, line, surface, out float hit, out _) && hit < limit)
return false;
}
return true;
}
public Vector3 Entry(Vector3 requested)
{
Vector2 origin = Confine(Plan(requested));