enderalse/source/scripts/_00E_EnderalVersion.psc
2024-08-06 22:09:07 +02:00

36 lines
753 B
Plaintext

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 2130.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