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(); }
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); } } }
internal static void SetEarlyGameVersion(AlmostVersion ver) { _gameVersion = ver; Logging.Logger.Default.Debug($"GameVersion set early to {ver}"); }