enderalse/source/scripts/_00E_Func_ReferenceFormList.psc

42 lines
885 B
Plaintext
Raw Normal View History

Scriptname _00E_Func_ReferenceFormList Hidden
Function Enable(FormList referenceList) Global
Int nItems = referenceList.GetSize()
Int i = 0
If nItems < 128 && nItems > 1 && SKSE.GetVersion() > 0
Form[] refArray = referenceList.ToArray()
While i < nItems
(refArray[i] as ObjectReference).EnableNoWait()
i += 1
EndWhile
Else
While i < nItems
(referenceList.GetAt(i) as ObjectReference).EnableNoWait()
i += 1
EndWhile
EndIf
EndFunction
Function Disable(FormList referenceList) Global
Int nItems = referenceList.GetSize()
Int i = 0
If nItems < 128 && nItems > 1 && SKSE.GetVersion() > 0
Form[] refArray = referenceList.ToArray()
While i < nItems
(refArray[i] as ObjectReference).DisableNoWait()
i += 1
EndWhile
Else
While i < nItems
(referenceList.GetAt(i) as ObjectReference).DisableNoWait()
i += 1
EndWhile
EndIf
EndFunction