4
Fork 0

Moved SetAutoSaveInterval() to the AutoSave quest alias

steam-1.6.1130
Eddoursul 3 months ago
parent f3605bb8d6
commit e6e3f324fb
  1. BIN
      UpdateAutosaveInterval.esp
  2. BIN
      scripts/_00E_AutosaveIntervalAlias.pex
  3. BIN
      scripts/_00e_autosavesystem_functions.pex
  4. BIN
      scripts/_00e_playersetupscript.pex
  5. 7
      source/scripts/_00E_AutosaveIntervalAlias.psc
  6. 6
      source/scripts/_00e_autosavesystem_functions.psc
  7. 15
      source/scripts/_00e_playersetupscript.psc

Binary file not shown.

@ -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…
Cancel
Save