public override void _Ready() { logo = GetNode <Control>(LogoPath); revolutionaryGames = GetNode <Control>(RevolutionaryGamesPath); supportedBy = GetNode <Control>(SupportedByPath); developersHeading = GetNode <Control>(DevelopersHeadingPath); if (TeamNameFont == null) { throw new InvalidOperationException($"{nameof(TeamNameFont)} not set"); } if (SectionNameFont == null) { throw new InvalidOperationException($"{nameof(SectionNameFont)} not set"); } credits = SimulationParameters.Instance.GetCredits(); steamVersion = SteamHandler.IsTaggedSteamRelease(); if (phase == CreditsPhase.NotRunning && AutoStart) { Setup(); } }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); instance = this; } //DontDestroyOnLoad(gameObject); }
public string?LocateGamePath() { var steam = new SteamHandler(); if (steam.FindAllGames() && steam.TryGetByID(895870, out var steamGame) && !string.IsNullOrWhiteSpace(steamGame?.Path)) { return(steamGame.Path); } var gog = new GOGHandler(); if (gog.FindAllGames() && gog.Games.Any() && gog.Games.FirstOrDefault(g => g.GameID == 1609812781) is { } gogEntry) { return(gogEntry.Path); } return(null); }
private static void FinalizeShutdown() { HistoryManager.FlushBuffer(); Conf.IsFirstRun = false; if (Conf.DiscardPlayerName == true) { Conf.LobbyPlayerName = ""; } if (Conf.DiscardPassword == true) { Conf.LobbyPlayerPassword = ""; } SaveConfig(); try { if (!Debugger.IsAttached) { mutex.ReleaseMutex(); } } catch { } try { if (ToolTip != null) { ToolTip.Dispose(); } if (Downloader != null) { Downloader.Dispose(); } if (SpringScanner != null) { SpringScanner.Dispose(); } if (SteamHandler != null) { SteamHandler.Dispose(); } } catch { } }
public SteamHandler() { instance = this; }