Moved SetAutoSaveInterval() to the AutoSave quest alias
This commit is contained in:
parent
f3605bb8d6
commit
e6e3f324fb
BIN
UpdateAutosaveInterval.esp
Normal file
BIN
UpdateAutosaveInterval.esp
Normal file
Binary file not shown.
BIN
scripts/_00E_AutosaveIntervalAlias.pex
Normal file
BIN
scripts/_00E_AutosaveIntervalAlias.pex
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
7
source/scripts/_00E_AutosaveIntervalAlias.psc
Normal file
7
source/scripts/_00E_AutosaveIntervalAlias.psc
Normal file
@ -0,0 +1,7 @@
|
||||
Scriptname _00E_AutosaveIntervalAlias extends ReferenceAlias Hidden
|
||||
|
||||
Event OnPlayerLoadGame()
|
||||
|
||||
(GetOwningQuest() as _00E_AutoSaveSystem_Functions).UpdateAutoSaveInterval()
|
||||
|
||||
EndEvent
|
@ -3,6 +3,10 @@ Scriptname _00E_AutoSaveSystem_Functions extends Quest
|
||||
Event OnInit()
|
||||
|
||||
fUpdateTime = Utility.GetIniFloat("fAutosaveEveryXMins:SaveGame")
|
||||
If fUpdateTime <= 0.0 ; just in case
|
||||
fUpdateTime = 60
|
||||
EndIf
|
||||
|
||||
RegisterForSingleUpdate(fUpdateTime*60)
|
||||
|
||||
EndEvent
|
||||
@ -24,7 +28,7 @@ EndEvent
|
||||
Function UpdateAutoSaveInterval()
|
||||
|
||||
fUpdateTime = Utility.GetIniFloat("fAutosaveEveryXMins:SaveGame")
|
||||
If fUpdateTime == 0.0 ; just in case
|
||||
If fUpdateTime <= 0.0 ; just in case
|
||||
fUpdateTime = 60
|
||||
EndIf
|
||||
|
||||
|
@ -27,19 +27,6 @@ Event OnPlayerLoadGame()
|
||||
EndEvent
|
||||
|
||||
|
||||
;=====================================================================================
|
||||
; ALL UPDATES
|
||||
;=====================================================================================
|
||||
|
||||
Function SetAutoSaveInterval()
|
||||
|
||||
; updates the autosave interval
|
||||
_00E_AutoSaveSystem_Functions AutoSaveSystem_Functions = Game.GetFormFromFile(0x00048141, "Skyrim.esm") as _00E_AutoSaveSystem_Functions
|
||||
AutoSaveSystem_Functions.UpdateAutoSaveInterval()
|
||||
|
||||
EndFunction
|
||||
|
||||
|
||||
;=====================================================================================
|
||||
; MAINTENANCE
|
||||
;=====================================================================================
|
||||
@ -60,8 +47,6 @@ Function Maintenance()
|
||||
Message.ResetHelpMessage("Clear")
|
||||
(Game.GetForm(0xAC80E) as Message).ShowAsHelpMessage("Clear", 0.1, 1, 1)
|
||||
|
||||
SetAutoSaveInterval()
|
||||
|
||||
EndFunction
|
||||
|
||||
;=====================================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user