parent
755f068713
commit
02ec6d9ac3
13 changed files with 60 additions and 53 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,29 +0,0 @@ |
||||
Scriptname EnderalUpgradeAlias extends ReferenceAlias Hidden |
||||
{This script handles game version upgrades, DO NOT MODIFY.} |
||||
|
||||
Float Property CURRENT_PATCH_VERSION = 2.1 AutoReadOnly |
||||
float fPatchVersion |
||||
|
||||
Event OnInit() |
||||
|
||||
; MQP01 |
||||
Quest startQuest = Game.GetForm(0x46F1A) as Quest |
||||
if startQuest.IsStageDone(10) || startQuest.IsCompleted() |
||||
While Utility.IsInMenuMode() |
||||
Utility.WaitMenuMode(0.1) |
||||
EndWhile |
||||
|
||||
Debug.MessageBox("A savegame was loaded which was made before the release of Enderal SE 2.1. In this save, several new features won't be available and there is a chance that you'll encounter grave bugs. Please, start a new game.") |
||||
;Game.QuitToMainMenu() |
||||
endif |
||||
|
||||
EndEvent |
||||
|
||||
Event OnPlayerLoadGame() |
||||
|
||||
if fPatchVersion < CURRENT_PATCH_VERSION |
||||
; |
||||
fPatchVersion = CURRENT_PATCH_VERSION |
||||
endif |
||||
|
||||
EndEvent |
@ -0,0 +1,35 @@ |
||||
Scriptname _00E_EnderalVersion extends ReferenceAlias Hidden |
||||
{This script handles Enderal SE updates, DO NOT MODIFY.} |
||||
|
||||
int iPatchVersion |
||||
|
||||
; Do not make comparisons with GetVersionFull(), versions are not float numbers, use GetVersion(). |
||||
float function _GetVersionFull() global |
||||
; ABCD.E |
||||
; A - engine version (1 - LE, 2 - SE) |
||||
; B - backward-incompatible update |
||||
; C - backward-compatible update |
||||
; D - hotfix |
||||
; E - build |
||||
return 2100.0 |
||||
endfunction |
||||
|
||||
int function GetVersion() global |
||||
return Math.Floor(_GetVersionFull()) |
||||
endfunction |
||||
|
||||
Event OnInit() |
||||
|
||||
iPatchVersion = GetVersion() |
||||
|
||||
EndEvent |
||||
|
||||
Event OnPlayerLoadGame() |
||||
|
||||
if iPatchVersion < GetVersion() |
||||
;Utility.Wait(0.1) ; wait for menu mode to end |
||||
; |
||||
iPatchVersion = GetVersion() |
||||
endif |
||||
|
||||
EndEvent |
Loading…
Reference in new issue