enderalse/source/scripts/_00E_EnderalVersion.psc

43 lines
1.2 KiB
Plaintext

Scriptname _00E_EnderalVersion extends ReferenceAlias Hidden
{This script handles Enderal SE updates, DO NOT MODIFY.}
int iPatchVersion
int function _GetScriptVersion() Global
return 2
endFunction
int function GetVersion() global
return EnderalFunctions.GetEnderalVersionInt()
endfunction
Event OnInit()
iPatchVersion = GetVersion()
EndEvent
Event OnPlayerLoadGame()
if iPatchVersion < 33620992 ; 2.1.4
Debug.Trace("Updating to v2.1.4 (33620992)...")
; Synchronize KillMoveConfig with KillMove
(Game.GetForm(0x49425) as GlobalVariable).SetValue((Game.GetForm(0x100F19) as GlobalVariable).GetValue())
endif
if iPatchVersion < 33620993 ; 2.1.4.1
Debug.Trace("Updating to v2.1.4.1 (33620993)...")
; Move Dreamflower Elixir recipe back to player
Actor rBlueprintActor = Game.GetFormFromFile(0x2A3DB, "Enderal - Forgotten Stories.esm") as Actor
MiscObject rDreamFlowerRecipe = Game.GetForm(0x43E1B) as MiscObject
Actor rPlayer = Game.GetForm(0x14) as Actor
rBlueprintActor.RemoveItem(rDreamFlowerRecipe, 1, true, rPlayer)
endif
if iPatchVersion < GetVersion()
Debug.Trace("Setting current version to " + GetVersion())
iPatchVersion = GetVersion()
endif
EndEvent