Update autosave interval on journal menu close
This commit is contained in:
parent
01e66e9f57
commit
db6dd31c9b
Binary file not shown.
@ -17,7 +17,11 @@ Event OnUpdate()
|
||||
|
||||
Actor PlayerREF = Game.GetForm(0x14) as Actor
|
||||
|
||||
If PlayerREF.IsInCombat() || PlayerREF.IsOnMount() || PlayerREF.IsSwimming() || ! Game.IsFightingControlsEnabled() || PlayerREF.IsDead() || Utility.IsInMenuMode() || UI.IsTextInputEnabled() || UI.IsMenuOpen("Dialogue Menu")
|
||||
if PlayerREF.IsDead()
|
||||
return
|
||||
endif
|
||||
|
||||
If PlayerREF.IsInCombat() || PlayerREF.IsOnMount() || PlayerREF.IsSwimming() || ! Game.IsFightingControlsEnabled() || Utility.IsInMenuMode() || UI.IsTextInputEnabled() || UI.IsMenuOpen("Dialogue Menu")
|
||||
RegisterForSingleUpdate(5)
|
||||
return
|
||||
endif
|
||||
@ -41,16 +45,26 @@ Function UpdateAutoSaveInterval()
|
||||
UnregisterForUpdate()
|
||||
return
|
||||
endif
|
||||
|
||||
|
||||
fUpdateTime = Utility.GetIniFloat("fAutosaveEveryXMins:SaveGame")
|
||||
|
||||
If fUpdateTime <= 0.0 ; just in case
|
||||
fUpdateTime = 30
|
||||
fUpdateTime = 30.0
|
||||
EndIf
|
||||
|
||||
RegisterForSingleUpdate(fUpdateTime*60)
|
||||
RegisterForMenu("Journal Menu")
|
||||
|
||||
EndFunction
|
||||
|
||||
Event OnMenuClose(String MenuName)
|
||||
float fAutosaveEveryXMins = Utility.GetIniFloat("fAutosaveEveryXMins:SaveGame")
|
||||
|
||||
if fUpdateTime as int != fAutosaveEveryXMins as int
|
||||
fUpdateTime = fAutosaveEveryXMins
|
||||
RegisterForSingleUpdate(fUpdateTime*60)
|
||||
endif
|
||||
EndEvent
|
||||
|
||||
int iAutosaveIndex = 0
|
||||
float fUpdateTime
|
||||
|
Loading…
Reference in New Issue
Block a user