Table of Contents

Class RescuePoints

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Reads the places a character can be rescued to out of a scene's cached details.

public static class RescuePoints
Inheritance
RescuePoints
Inherited Members

Remarks

Pure: no scene, no network, no character. Both the game master rescue and the player's own unstuck resolve through here, so "nearest respawn point" means one thing in both.

The scene's own details only. Every point comes from the details of the scene the caller passes, which is the scene the character is physically in. A point from another scene written into this one is valid coordinates in a place the character is not loaded into, and reads to the player as falling through the world — the thing a rescue exists to fix.

Fields

KindWords

The words an operator types for each kind, in RescuePointKind order.

public static readonly string[] KindWords

Field Value

string[]

Methods

List(WorldSceneDetails, RescuePointKind)

Every point of a kind in the scene, in authored order. Never null.

public static List<RescuePoint> List(WorldSceneDetails details, RescuePointKind kind)

Parameters

details WorldSceneDetails
kind RescuePointKind

Returns

List<RescuePoint>

TryFind(WorldSceneDetails, RescuePointKind, string, Vector3, out RescuePoint)

Finds a point of a kind: the named one, or the nearest to from when no name is given.

public static bool TryFind(WorldSceneDetails details, RescuePointKind kind, string name, Vector3 from, out RescuePoint point)

Parameters

details WorldSceneDetails

The details of the scene the character is in.

kind RescuePointKind

Which kind of point.

name string

The point's name, or null/blank for the nearest.

from Vector3

The character's position, for the nearest.

point RescuePoint

The point found.

Returns

bool

Remarks

A name matches exactly, ignoring case. A waypoint also matches by its authored index, so an operator reading the index off the map can type it. There is deliberately no prefix or "closest spelling" match: a rescue that silently picks a different place than the one typed puts a player somewhere the operator did not intend and cannot see.

TryParseKind(string, out RescuePointKind)

Parses a kind word, case-insensitively.

public static bool TryParseKind(string word, out RescuePointKind kind)

Parameters

word string
kind RescuePointKind

Returns

bool