Table of Contents

Class MapMarkerExtensions

Namespace
SkyrimForge.Game
Assembly
SkyrimForge.Game.dll

Provides extension members for MapMarker, a sequence of them, and GameTarget.

public static class MapMarkerExtensions
Inheritance
MapMarkerExtensions
Inherited Members

Methods

FindByReferenceId(FormId<ObjectReference>)

Finds the map marker whose reference has the form ID referenceId. The result is null where that reference is no named map marker.

public static MapMarker? FindByReferenceId(FormId<ObjectReference> referenceId)

Parameters

referenceId FormId<ObjectReference>

Returns

MapMarker?

GetMapMarkers(GameTarget)

Reads every named map marker of every worldspace.

public static IReadOnlyList<MapMarker> GetMapMarkers(this GameTarget gameTarget)

Parameters

gameTarget GameTarget

Returns

IReadOnlyList<MapMarker>

Remarks

The first call enumerates each worldspace's persistent cell, so a marker created after it is not included.

GetNearest(IEnumerable<MapMarker>, FormId<WorldSpace>?, NiPoint3, Func<MapMarker, bool>?)

Returns the marker in worldspaceId nearest position in the horizontal plane, among those that pass predicate. A null worldspaceId matches no marker, and a null predicate accepts every marker.

public static MapMarker? GetNearest(this IEnumerable<MapMarker> markers, FormId<WorldSpace>? worldspaceId, NiPoint3 position, Func<MapMarker, bool>? predicate = null)

Parameters

markers IEnumerable<MapMarker>
worldspaceId FormId<WorldSpace>?
position NiPoint3
predicate Func<MapMarker, bool>

Returns

MapMarker?

GetWorldspaceId(IEnumerable<MapMarker>, Location)

The worldspace of the marker whose location contains location.

public static FormId<WorldSpace>? GetWorldspaceId(this IEnumerable<MapMarker> markers, Location location)

Parameters

markers IEnumerable<MapMarker>
location Location

The location to resolve, such as the one an actor stands in.

Returns

FormId<WorldSpace>?

The worldspace's form ID, or null where no marker's location contains it.

Remarks

An actor inside a building has no worldspace of its own, and the marker of the settlement containing that interior states the worldspace.