Class PapyrusScriptExtensions
- Namespace
- SkyrimForge.Papyrus
- Assembly
- SkyrimForge.Game.dll
Provides extension members for PapyrusScript<T>.
public static class PapyrusScriptExtensions
- Inheritance
-
PapyrusScriptExtensions
- Inherited Members
Methods
AddItem<T, TForm>(PapyrusScript<T>, FormId<TForm>, int, bool)
Adds the item akItemToAdd identifies to this reference's inventory.
public static Task AddItem<T, TForm>(this PapyrusScript<T> self, FormId<TForm> akItemToAdd, int aiCount = 1, bool abSilent = false) where T : notnull, IObjectReference where TForm : struct, IForm
Parameters
selfPapyrusScript<T>akItemToAddFormId<TForm>aiCountintabSilentbool
Returns
Type Parameters
TTForm
Exceptions
- InvalidOperationException
No form has the ID, or the form is not a
TForm.
GetItemCount<T, TForm>(PapyrusScript<T>, FormId<TForm>)
Returns how many of the item akItem identifies are in this reference's inventory.
public static Task<int> GetItemCount<T, TForm>(this PapyrusScript<T> self, FormId<TForm> akItem) where T : notnull, IObjectReference where TForm : struct, IForm
Parameters
selfPapyrusScript<T>akItemFormId<TForm>
Returns
Type Parameters
TTForm
Exceptions
- InvalidOperationException
No form has the ID, or the form is not a
TForm.
RemoveItem<T, TForm>(PapyrusScript<T>, FormId<TForm>, int, bool, IObjectReference?)
Removes the item akItemToRemove identifies from this reference's inventory.
public static Task RemoveItem<T, TForm>(this PapyrusScript<T> self, FormId<TForm> akItemToRemove, int aiCount = 1, bool abSilent = false, IObjectReference? akOtherContainer = null) where T : notnull, IObjectReference where TForm : struct, IForm
Parameters
selfPapyrusScript<T>akItemToRemoveFormId<TForm>aiCountintabSilentboolakOtherContainerIObjectReference
Returns
Type Parameters
TTForm
Exceptions
- InvalidOperationException
No form has the ID, or the form is not a
TForm.