Table of Contents

Class LocationExtensions

Namespace
SkyrimForge.Game
Assembly
SkyrimForge.Game.dll

Provides extension members for Location.

public static class LocationExtensions
Inheritance
LocationExtensions
Inherited Members

Methods

GetAncestors(Location)

The locations containing the location, innermost first.

public static IReadOnlyList<Location> GetAncestors(this Location location)

Parameters

location Location

Returns

IReadOnlyList<Location>

Parent locations, innermost first.

GetSelfAndAncestors(Location)

The location and each location containing it, innermost first.

public static IReadOnlyList<Location> GetSelfAndAncestors(this Location location)

Parameters

location Location

Returns

IReadOnlyList<Location>

The location, then each parent location in turn, ending at the outermost one.

HasKeyword<TKeyword>(Location, TKeyword)

Determines whether the location has keyword.

public static bool HasKeyword<TKeyword>(this Location location, TKeyword keyword) where TKeyword : notnull, IKeyword

Parameters

location Location
keyword TKeyword

Returns

bool

Type Parameters

TKeyword

IsWithin(Location, FormId<Location>)

Whether the location is ancestorId or sits inside it.

public static bool IsWithin(this Location location, FormId<Location> ancestorId)

Parameters

location Location
ancestorId FormId<Location>

Returns

bool

true where the location or one containing it has that ID.

Remarks

An inn is a location inside its town, so a test against the town's ID is true of every inn and house inside that town.