Class TESDataHandlerExtensions
- Namespace
- SkyrimForge.Game
- Assembly
- SkyrimForge.Game.dll
Provides extension members for TESDataHandler.
public static class TESDataHandlerExtensions
- Inheritance
-
TESDataHandlerExtensions
- Inherited Members
Methods
GetFormArray<TForm>(TESDataHandler)
Gets every form of TForm's form type, as CommonLib's GetFormArray<T> does.
public static IReadOnlyList<TForm> GetFormArray<TForm>(this TESDataHandler dataHandler) where TForm : struct, IForm
Parameters
dataHandlerTESDataHandler
Returns
- IReadOnlyList<TForm>
Type Parameters
TForm
Remarks
A form that is not a TForm is left out.
Exceptions
- NotSupportedException
TFormhas no form type of its own, as a base such as TESBoundObject does not.
GetFormIdOrNull<TForm>(TESDataHandler, string, uint)
Gets the ID that the form localFormId of the file fileName has in the running load order,
or null where no loaded file has that name.
public static FormId<TForm>? GetFormIdOrNull<TForm>(this TESDataHandler dataHandler, string fileName, uint localFormId) where TForm : struct, IForm
Parameters
dataHandlerTESDataHandlerfileNamestringThe name of the .esm, .esp, or .esl file that declares the form, such as Skyrim.esm.
localFormIduintThe form's ID without the file's load-order index: at most 0xFFFFFF, or 0xFFF in a light file.
Returns
- FormId<TForm>?
Type Parameters
TForm
Exceptions
- ArgumentNullException
fileNameisnull.- ArgumentOutOfRangeException
localFormIdexceeds 0xFFFFFF, or 0xFFF in a light file.
GetFormId<TForm>(TESDataHandler, string, uint)
Gets the ID that the form localFormId of the file fileName has in the running load order.
public static FormId<TForm> GetFormId<TForm>(this TESDataHandler dataHandler, string fileName, uint localFormId) where TForm : struct, IForm
Parameters
dataHandlerTESDataHandlerfileNamestringThe name of the .esm, .esp, or .esl file that declares the form, such as Skyrim.esm.
localFormIduintThe form's ID without the file's load-order index: at most 0xFFFFFF, or 0xFFF in a light file.
Returns
- FormId<TForm>
Type Parameters
TForm
Exceptions
- ArgumentNullException
fileNameisnull.- ArgumentOutOfRangeException
localFormIdexceeds 0xFFFFFF, or 0xFFF in a light file.- InvalidOperationException
No loaded file is named
fileName.
GetLoadedLightMods(TESDataHandler)
Gets the light .esm, .esp, and .esl files, which the game stores in a separate array and leaves out of GetLoadedMods(TESDataHandler). On Skyrim VR this returns them where SkyrimVRESL is installed, and an empty sequence otherwise.
public static IReadOnlyList<TESFile> GetLoadedLightMods(this TESDataHandler dataHandler)
Parameters
dataHandlerTESDataHandler
Returns
GetLoadedMods(TESDataHandler)
Gets the .esm and .esp files that are not light, in load order.
public static IReadOnlyList<TESFile> GetLoadedMods(this TESDataHandler dataHandler)
Parameters
dataHandlerTESDataHandler