public override bool IsUpdateNeeded() { DepotConfigStore.LoadFromFile(Path.Combine(Game.Path, ".DepotDownloader", "depot.config")); if (DepotConfigStore.Instance.InstalledManifestIDs.TryGetValue(DepotId, out var installedManifest)) { if (IsPreObfuscation) { if (installedManifest == PreObfuscationManifest) { return(false); } } else { if (ContentDownloader.steam3 == null) { ContentDownloader.InitializeSteam3(); } ContentDownloader.steam3 !.RequestAppInfo(AppId); var depots = ContentDownloader.GetSteam3AppSection(AppId, EAppInfoSection.Depots); if (installedManifest == depots[DepotId.ToString()]["manifests"][ContentDownloader.DEFAULT_BRANCH].AsUnsignedLong()) { return(false); } } } return(true); }
static bool InitializeSteam(string username, string password) { if (username != null && password == null && (!ContentDownloader.Config.RememberPassword || !AccountSettingsStore.Instance.LoginKeys.ContainsKey(username))) { do { Console.Write("Enter account password for \"{0}\": ", username); if (Console.IsInputRedirected) { password = Console.ReadLine(); } else { // Avoid console echoing of password password = Util.ReadPassword(); } Console.WriteLine(); } while (String.Empty == password); } else if (username == null) { Console.WriteLine("No username given. Using anonymous account with dedicated server subscription."); } // capture the supplied password in case we need to re-use it after checking the login key ContentDownloader.Config.SuppliedPassword = password; return(ContentDownloader.InitializeSteam3(username, password)); }
public override void Setup() { if (ContentDownloader.steam3 != null && ContentDownloader.steam3.bConnected) { return; } AccountSettingsStore.LoadFromFile("account.config"); var environmentVariable = Environment.GetEnvironmentVariable("STEAM"); if (environmentVariable != null) { var split = environmentVariable.Split(":"); if (!ContentDownloader.InitializeSteam3(split[0], split[1])) { throw new ProviderConnectionException(this, "Incorrect credentials."); } } else { ContentDownloader.Config.RememberPassword = true; Console.Write("Steam username: "******"Steam password: "******"Incorrect credentials."); } } if (ContentDownloader.steam3 == null || !ContentDownloader.steam3.bConnected) { throw new ProviderConnectionException(this, "Unable to initialize Steam3 session."); } ContentDownloader.Config.UsingFileList = true; ContentDownloader.Config.FilesToDownload = new List <string> { "GameAssembly.dll" }; ContentDownloader.Config.FilesToDownloadRegex = new List <Regex> { new Regex("^Among Us_Data/il2cpp_data/Metadata/global-metadata.dat$".Replace("/", "[\\\\|/]"), RegexOptions.Compiled | RegexOptions.IgnoreCase), new Regex("^Among Us_Data/globalgamemanagers$".Replace("/", "[\\\\|/]"), RegexOptions.Compiled | RegexOptions.IgnoreCase) }; }
public const ulong ManifestId = 5200448423569257054; // 2021.3.5s public override async Task RunAsync(BuildContext context) { AccountSettingsStore.LoadFromFile("account.config"); var steam = context.EnvironmentVariable <string>("STEAM", null).Split(":"); context.Information("Logging into steam"); ContentDownloader.InitializeSteam3(steam[0], steam[1]); ContentDownloader.Config.InstallDirectory = context.AmongUsPath; context.Information("Downloading the game from steam"); await ContentDownloader.DownloadAppAsync(AppId, DepotId, ManifestId); ContentDownloader.ShutdownSteam3(); var bepinexZip = context.DownloadFile("https://github.com/NuclearPowered/BepInEx/releases/download/6.0.0-reactor.16/BepInEx-6.0.0-reactor.16.zip"); context.Unzip(bepinexZip, Path.Combine(context.AmongUsPath)); }
public override async Task RunAsync(BuildContext context) { Console.WriteLine("Test"); AccountSettingsStore.LoadFromFile("account.config"); Console.WriteLine("Test"); var steam = context.EnvironmentVariable <string>("STEAM", null).Split(":"); Console.WriteLine("Test"); context.Information("Logging into steam"); ContentDownloader.InitializeSteam3(steam[0], steam[1]); ContentDownloader.Config.InstallDirectory = context.AmongUsPath; context.Information("Downloading the game from steam"); await ContentDownloader.DownloadAppAsync(AppId, DepotId); ContentDownloader.ShutdownSteam3(); var bepinexZip = context.DownloadFile("https://www.dropbox.com/s/3mjml7cexxbq2tp/BepInEx_UnityIL2CPP_x86_8f5bfe4_6.0.0-reactor.17.zip?dl=1"); context.Unzip(bepinexZip, Path.Combine(context.AmongUsPath)); }