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
locationLocation
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
locationLocation
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
locationLocationkeywordTKeyword
Returns
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
Returns
- bool
truewhere 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.