コード例 #1
0
        internal static void CheckGameVersionBoundary()
        {
            var gameVer  = GameVersion;
            var lastVerS = SelfConfig.LastGameVersion_;

            OldVersion = lastVerS != null ? new AlmostVersion(lastVerS, gameVer) : null;

            IsGameVersionBoundary = OldVersion != null && gameVer != OldVersion;

            SelfConfig.Instance.LastGameVersion = gameVer.ToString();
        }
コード例 #2
0
 internal static void EnsureRuntimeGameVersion()
 {
     try
     {
         var rtVer = new AlmostVersion(ApplicationVersionProxy);
         if (!rtVer.Equals(_gameVersion)) // this actually uses stricter equality than == for AlmostVersion
         {
             Logging.Logger.log.Warn($"Early version {_gameVersion} parsed from game files doesn't match runtime version {rtVer}!");
             _gameVersion = rtVer;
         }
     }
     catch (MissingMethodException e)
     {
         Logging.Logger.log.Error("Application.version was not found! Cannot check early parsed version");
         if (SelfConfig.Debug_.ShowHandledErrorStackTraces_)
         {
             Logging.Logger.log.Error(e);
         }
     }
 }
コード例 #3
0
 internal static void SetEarlyGameVersion(AlmostVersion ver)
 {
     _gameVersion = ver;
     Logging.Logger.Default.Debug($"GameVersion set early to {ver}");
 }