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
|
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)
|
RegisterForSingleUpdate(5)
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
@ -45,12 +49,22 @@ Function UpdateAutoSaveInterval()
|
|||||||
fUpdateTime = Utility.GetIniFloat("fAutosaveEveryXMins:SaveGame")
|
fUpdateTime = Utility.GetIniFloat("fAutosaveEveryXMins:SaveGame")
|
||||||
|
|
||||||
If fUpdateTime <= 0.0 ; just in case
|
If fUpdateTime <= 0.0 ; just in case
|
||||||
fUpdateTime = 30
|
fUpdateTime = 30.0
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
RegisterForSingleUpdate(fUpdateTime*60)
|
RegisterForSingleUpdate(fUpdateTime*60)
|
||||||
|
RegisterForMenu("Journal Menu")
|
||||||
|
|
||||||
EndFunction
|
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
|
int iAutosaveIndex = 0
|
||||||
float fUpdateTime
|
float fUpdateTime
|
||||||
|
Loading…
Reference in New Issue
Block a user