Nebula
Containers

PortalLink

One party's link through a Portal (docs/portals.md D8, D9): the far scope, the state the link is in and, when it is not open, what it waits for.

generated from the sources
public sealed class PortalLink

One party's link through a Portal (docs/portals.md D8, D9): the far scope, the state the link is in and, when it is not open, what it waits for. Created by Portal.Open; the worker that owns the portal drives it Closed → Preparing → Open → Closing → Closed. Read it from the worker that owns the portal.

Properties

Portal

public Portal Portal { get; }

The portal this link goes through.

Party

public string Party { get; }

The party it is for: an opaque string the game chose (docs/portals.md D8).

Id

public ulong Id { get; }

The link's id (PortalIds.Link).

State

public PortalState State { get; }

Where the link stands.

Wait

public PortalWait Wait { get; }

Why the link is not open; PortalWait.None when it is.

WaitClient

public ulong WaitClient { get; }

The member client the link waits for while Wait is PortalWait.ClientWarming; else 0.

Progress

public float Progress { get; }

How ready the link is, from 0 to 1: something for a door's UI to show while it opens. 1 once open.

Error

public string Error { get; }

Why the far content failed to load, when it did; else null.

Generation

public uint Generation { get; }

Counts the link's openings (see PortalLinkRecord.Generation).

FarScope

public ulong FarScope { get; }

The far scope (0 until it is known).

FarScopeKey

public string FarScopeKey { get; } = "";

The far scope's key.

FarFace

public PortalFace FarFace { get; }

The far face. Its scope is FarScope; for a template far side it is the near face read in the instance's own upright space (docs/portals.md D5).

FarEntry

public Container FarEntry { get; }

The far container a crossing enters, once the far scope's rows are here; else null.

NearFace

public PortalFace NearFace { get; }

The near face.

IsOpen

public bool IsOpen { get; }

Whether the link is PortalState.Open.

Members

public IReadOnlyCollection<ulong> Members { get; }

The clients that must be warm before the link opens (docs/portals.md D13).

Observers

public IReadOnlyCollection<ulong> Observers { get; }

The clients that may look through the link (docs/portals.md D11).

ObserverAnyone

public bool ObserverAnyone { get; }

Whether anyone may look through the link, not only its observers.

Turn

public Quaternion Turn { get; }

What turns a rotation or direction of the far scope's space into the near scope's: the near face's rotation times the far face's inverse (docs/portals.md D4). For a coincident portal it is the pure turn about the door.

Methods

IsMember

public bool IsMember(ulong clientId);

Whether clientId is a member.

IsWarm

public bool IsWarm(ulong clientId);

Whether clientId has said it holds the far window (MsgId.PortalWarm).

IsObserver

public bool IsObserver(ulong clientId);

Whether clientId may look through the link.

ToNear

public Double3 ToNear(Double3 farPoint);

A point of the far scope (absolute) in the near scope: N.Origin + (N.Rotation × F.Rotation⁻¹) × (p − F.Origin), applied about the faces and in double (docs/portals.md D4, D37).

ToFar

public Double3 ToFar(Double3 nearPoint);

The inverse of ToNear: a point of the near scope in the far scope.

ToString

public override string ToString();

On this page