Make voyages active with dockside orders, crew calls, and ship PA
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user