4
Fork 0

Moved ReferenceFormList functions to a dedicated script

Eddoursul 3 months ago
parent 4c234ae3e9
commit 99cd517996
  1. BIN
      scripts/_00e_fs_mq18c_functions.pex
  2. BIN
      scripts/_00e_func_referenceformlist.pex
  3. BIN
      scripts/_00e_mq10b_questfunctions.pex
  4. BIN
      scripts/_00e_mq11a_functions.pex
  5. BIN
      scripts/_00e_mq12b_functions.pex
  6. BIN
      scripts/_00e_mq12c_functions.pex
  7. BIN
      scripts/_00e_nq_g_07_functions.pex
  8. BIN
      scripts/_00e_questfunctions.pex
  9. 2
      source/scripts/_00e_fs_mq18c_functions.psc
  10. 41
      source/scripts/_00e_func_referenceformlist.psc
  11. 2
      source/scripts/_00e_mq10b_questfunctions.psc
  12. 2
      source/scripts/_00e_mq11a_functions.psc
  13. 4
      source/scripts/_00e_mq12b_functions.psc
  14. 2
      source/scripts/_00e_mq12c_functions.psc
  15. 2
      source/scripts/_00e_nq_g_07_functions.psc
  16. 40
      source/scripts/_00e_questfunctions.psc

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -28,7 +28,7 @@ Function SetUpDreamScene()
PlayerREF.MoveTo(PlayerStartMarkerNew)
SkyrimStormRain.ForceActive(True)
_00E_QuestFunctions.DisableReferenceFormList(FS_MQ18c_StuffToDisable)
_00E_Func_ReferenceFormList.Disable(FS_MQ18c_StuffToDisable)
; if Player.GetSex() == 1
; FS_MQ18c_PlayerREF.Disable()

@ -0,0 +1,41 @@
Scriptname _00E_Func_ReferenceFormList Hidden
Function Enable(FormList referenceList) Global
Int nItems = referenceList.GetSize()
Int i = 0
If nItems < 128 && nItems > 1
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
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

@ -94,7 +94,7 @@ Function PortJespar()
CQC03.SetStage(5)
EndIf
_00E_QuestFunctions.EnableReferenceFormList(_00E_MQ09b_NehrimeseSoldiersFRM)
_00E_Func_ReferenceFormList.Enable(_00E_MQ09b_NehrimeseSoldiersFRM)
EndFunction

@ -1467,7 +1467,7 @@ Function GoToFrostcliffTavern()
; the player to talk to her.
MQ11a_SC26_Door.SetLockLevel(255)
MQ11a_SC26_Door.Lock()
_00E_QuestFunctions.EnableReferenceFormList(MQ11a_SC6_WolfPackGates)
_00E_Func_ReferenceFormList.Enable(MQ11a_SC6_WolfPackGates)
; Failsave to fix a bug in which the player fails to sit down
; and instead levitates through the level
; ( http://forum.sureai.net//tracker.php?p=8&t=10396

@ -115,7 +115,7 @@ Function ReEnableNPCs()
; Old ways of enabling NPCs, for backward compatibility
OldReenableDisabledNPC()
If CurScriptVersion == 0
_00E_QuestFunctions.EnableReferenceFormList(MQ12b_SC11_NPCsRef)
_00E_Func_ReferenceFormList.Enable(MQ12b_SC11_NPCsRef)
MQ12b_SiegeNPCs.Revert()
@ -125,7 +125,7 @@ EndFunction
Function OldReenableDisabledNPC() ; For version updates with CurScriptVersion < 2
If CurScriptVersion < 2
_00E_QuestFunctions.EnableReferenceFormList(MQ12b_AllDisabledNPCs)
_00E_Func_ReferenceFormList.Enable(MQ12b_AllDisabledNPCs)
EndIf
EndFunction

@ -91,7 +91,7 @@ Function DebrisLevel01()
; and hence the flag can't be set for an actor's reference it gets set for the actor base
; resulting in all actor references of the possessed NPCs that are included in the formlist being flagged as ghost
; I took the possessed NPCs out of those lists and created this new one, that isn't used by the harbor trigger at all
_00E_QuestFunctions.EnableReferenceFormList(_00E_MQ12c_PossessedNPCs)
_00E_Func_ReferenceFormList.Enable(_00E_MQ12c_PossessedNPCs)
MQ12c_SC1_ExecutionDoor001.BlockActivation(True)
MQ12c_SC1_ExecutionDoor001.SetLockLevel(255)

@ -1588,7 +1588,7 @@ Function SetUpGraveyardScene()
NQG07Dijaam_Navcut_01.Enable()
NQG07Dijaam_Navcut_02.Enable()
Levelsystem.SkipTimeToHour(22.0)
_00E_QuestFunctions.DisableReferenceFormList(NQG07_GraveyardNPCs)
_00E_Func_ReferenceFormList.Disable(NQG07_GraveyardNPCs)
_00E_SC_DijaamOnelys.MoveTo(PlayerREF)

@ -222,46 +222,6 @@ Function WaitForReferenceToLoad(ObjectReference ref) Global
EndFunction
Function EnableReferenceFormList(FormList referenceList) Global
Int nItems = referenceList.GetSize()
Int i = 0
If nItems < 128 && nItems > 1
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 DisableReferenceFormList(FormList referenceList) Global
Int nItems = referenceList.GetSize()
Int i = 0
If nItems < 128 && nItems > 1
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
Float Function AdjustTimePeriodByEngineTimerError(Float fUnadjustedPeriod) Global
; In SE, the game time runs slower than the real time by about 2.5/60 second

Loading…
Cancel
Save