mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Whitespace formatting, move Integrations folder
This commit is contained in:
parent
92c420d888
commit
cc22ee1591
@ -14,9 +14,9 @@ using Microsoft.Win32;
|
||||
|
||||
using Bloxstrap.Dialogs;
|
||||
using Bloxstrap.Helpers;
|
||||
using Bloxstrap.Helpers.Integrations;
|
||||
using Bloxstrap.Helpers.RSMM;
|
||||
using Bloxstrap.Models;
|
||||
using Bloxstrap.Integrations;
|
||||
|
||||
namespace Bloxstrap
|
||||
{
|
||||
|
@ -6,12 +6,13 @@ using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Bloxstrap.Helpers;
|
||||
|
||||
using Bloxstrap.Models;
|
||||
|
||||
using DiscordRPC;
|
||||
|
||||
namespace Bloxstrap.Helpers.Integrations
|
||||
namespace Bloxstrap.Integrations
|
||||
{
|
||||
class DiscordRichPresence : IDisposable
|
||||
{
|
||||
@ -36,10 +37,10 @@ namespace Bloxstrap.Helpers.Integrations
|
||||
|
||||
public DiscordRichPresence()
|
||||
{
|
||||
_rpcClient.OnReady += (_, e) =>
|
||||
_rpcClient.OnReady += (_, e) =>
|
||||
App.Logger.WriteLine($"[DiscordRichPresence::DiscordRichPresence] Received ready from user {e.User.Username} ({e.User.ID})");
|
||||
|
||||
_rpcClient.OnPresenceUpdate += (_, e) =>
|
||||
_rpcClient.OnPresenceUpdate += (_, e) =>
|
||||
App.Logger.WriteLine("[DiscordRichPresence::DiscordRichPresence] Updated presence");
|
||||
|
||||
_rpcClient.OnConnectionEstablished += (_, e) =>
|
||||
@ -62,7 +63,7 @@ namespace Bloxstrap.Helpers.Integrations
|
||||
|
||||
// debug stats to ensure that the log reader is working correctly
|
||||
// if more than 5000 log entries have been read, only log per 100 to save on spam
|
||||
if (_logEntriesRead <= 5000 && _logEntriesRead % 50 == 0)
|
||||
if (_logEntriesRead <= 5000 && _logEntriesRead % 50 == 0)
|
||||
App.Logger.WriteLine($"[DiscordRichPresence::ExamineLogEntry] Read {_logEntriesRead} log entries");
|
||||
else if (_logEntriesRead % 100 == 0)
|
||||
App.Logger.WriteLine($"[DiscordRichPresence::ExamineLogEntry] Read {_logEntriesRead} log entries");
|
||||
@ -75,7 +76,7 @@ namespace Bloxstrap.Helpers.Integrations
|
||||
return;
|
||||
|
||||
_activityInGame = false;
|
||||
_activityPlaceId = Int64.Parse(match.Groups[2].Value);
|
||||
_activityPlaceId = long.Parse(match.Groups[2].Value);
|
||||
_activityJobId = match.Groups[1].Value;
|
||||
_activityMachineAddress = match.Groups[3].Value;
|
||||
|
||||
@ -160,7 +161,7 @@ namespace Bloxstrap.Helpers.Integrations
|
||||
{
|
||||
string? log = await sr.ReadLineAsync();
|
||||
|
||||
if (String.IsNullOrEmpty(log))
|
||||
if (string.IsNullOrEmpty(log))
|
||||
logUpdatedEvent.WaitOne(1000);
|
||||
else
|
||||
await ExamineLogEntry(log);
|
@ -3,10 +3,11 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Threading.Tasks;
|
||||
using Bloxstrap.Helpers;
|
||||
|
||||
using Bloxstrap.Models;
|
||||
|
||||
namespace Bloxstrap.Helpers.Integrations
|
||||
namespace Bloxstrap.Integrations
|
||||
{
|
||||
internal class RbxFpsUnlocker
|
||||
{
|
||||
@ -14,7 +15,7 @@ namespace Bloxstrap.Helpers.Integrations
|
||||
public const string ProjectRepository = "axstin/rbxfpsunlocker";
|
||||
|
||||
// default settings but with QuickStart set to true and CheckForUpdates set to false
|
||||
private static readonly string Settings =
|
||||
private static readonly string Settings =
|
||||
"UnlockClient=true\n" +
|
||||
"UnlockStudio=false\n" +
|
||||
"FPSCapValues=[30.000000, 60.000000, 75.000000, 120.000000, 144.000000, 165.000000, 240.000000, 360.000000]\n" +
|
||||
@ -33,7 +34,7 @@ namespace Bloxstrap.Helpers.Integrations
|
||||
return;
|
||||
|
||||
App.Logger.WriteLine("[RbxFpsUnlocker::CheckIfRunning] Closing currently running rbxfpsunlocker processes...");
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
foreach (Process process in processes)
|
@ -7,13 +7,14 @@ using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Bloxstrap.Helpers;
|
||||
|
||||
using Bloxstrap.Models;
|
||||
|
||||
using IniParser;
|
||||
using IniParser.Model;
|
||||
|
||||
namespace Bloxstrap.Helpers.Integrations
|
||||
namespace Bloxstrap.Integrations
|
||||
{
|
||||
internal class ReShade
|
||||
{
|
||||
@ -64,9 +65,9 @@ namespace Bloxstrap.Helpers.Integrations
|
||||
}
|
||||
},
|
||||
|
||||
new ReShadeShaderConfig
|
||||
{
|
||||
Name = "AlucardDH",
|
||||
new ReShadeShaderConfig
|
||||
{
|
||||
Name = "AlucardDH",
|
||||
DownloadLocation = "https://github.com/AlucardDH/dh-reshade-shaders/archive/refs/heads/master.zip",
|
||||
ExcludedFiles = new List<string>()
|
||||
{
|
||||
@ -77,10 +78,10 @@ namespace Bloxstrap.Helpers.Integrations
|
||||
}
|
||||
},
|
||||
|
||||
new ReShadeShaderConfig
|
||||
{
|
||||
Name = "Stormshade",
|
||||
DownloadLocation = "https://github.com/cyrie/Stormshade/archive/refs/heads/master.zip",
|
||||
new ReShadeShaderConfig
|
||||
{
|
||||
Name = "Stormshade",
|
||||
DownloadLocation = "https://github.com/cyrie/Stormshade/archive/refs/heads/master.zip",
|
||||
BaseFolder = "reshade-shaders/",
|
||||
ExcludedFiles = new List<string>()
|
||||
{
|
||||
@ -114,8 +115,8 @@ namespace Bloxstrap.Helpers.Integrations
|
||||
"prod80",
|
||||
"qUINT",
|
||||
"StockLegacy",
|
||||
"Stormshade",
|
||||
"SweetFX",
|
||||
"Stormshade",
|
||||
"SweetFX",
|
||||
};
|
||||
|
||||
private static string GetSearchPath(string type, string name)
|
||||
@ -378,7 +379,7 @@ namespace Bloxstrap.Helpers.Integrations
|
||||
|
||||
string injectorLocation = Path.Combine(Directories.Modifications, "dxgi.dll");
|
||||
|
||||
if (!App.Settings.Prop.UseReShadeExtraviPresets && !String.IsNullOrEmpty(App.State.Prop.ExtraviReShadePresetsVersion))
|
||||
if (!App.Settings.Prop.UseReShadeExtraviPresets && !string.IsNullOrEmpty(App.State.Prop.ExtraviReShadePresetsVersion))
|
||||
{
|
||||
if (Utilities.GetProcessCount("RobloxPlayerBeta") > 0)
|
||||
return;
|
||||
@ -398,7 +399,7 @@ namespace Bloxstrap.Helpers.Integrations
|
||||
|
||||
// we should already be uninstalled
|
||||
// we want to ensure this is done one-time only as this could possibly interfere with other rendering hooks using dxgi.dll
|
||||
if (String.IsNullOrEmpty(App.State.Prop.ReShadeConfigVersion))
|
||||
if (string.IsNullOrEmpty(App.State.Prop.ReShadeConfigVersion))
|
||||
return;
|
||||
|
||||
App.Logger.WriteLine("[ReShade::CheckModifications] Uninstalling ReShade...");
|
||||
@ -433,43 +434,43 @@ namespace Bloxstrap.Helpers.Integrations
|
||||
if (injectorVersionInfo.ProductVersion != versionManifest.ReShade)
|
||||
shouldFetchReShade = true;
|
||||
|
||||
// UPDATE CHECK - if we're upgrading to reshade 5.7.0, or we have extravi's presets
|
||||
// UPDATE CHECK - if we're upgrading to reshade 5.7.0, or we have extravi's presets
|
||||
// enabled with a known shader downloaded (like AlucardDH) but without stormshade downloaded (5.7.0+ specific),
|
||||
// we need to redownload all our shaders fresh
|
||||
if (
|
||||
injectorVersionInfo.ProductVersion != versionManifest.ReShade && versionManifest.ReShade == "5.7.0" ||
|
||||
if (
|
||||
injectorVersionInfo.ProductVersion != versionManifest.ReShade && versionManifest.ReShade == "5.7.0" ||
|
||||
App.Settings.Prop.UseReShadeExtraviPresets && Directory.Exists(Path.Combine(ShadersFolder, "AlucardDH")) && !Directory.Exists(Path.Combine(ShadersFolder, "Stormshade"))
|
||||
)
|
||||
{
|
||||
Directory.Delete(ShadersFolder, true);
|
||||
Directory.Delete(TexturesFolder, true);
|
||||
{
|
||||
Directory.Delete(ShadersFolder, true);
|
||||
Directory.Delete(TexturesFolder, true);
|
||||
App.State.Prop.ExtraviReShadePresetsVersion = "";
|
||||
App.Logger.WriteLine("[ReShade::CheckModifications] Upgrading to ReShade 5.7.0 - redownloading all shaders!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
App.Logger.WriteLine("[ReShade::CheckModifications] versionManifest is null!");
|
||||
}
|
||||
|
||||
// we're about to download - initialize directories
|
||||
Directory.CreateDirectory(BaseDirectory);
|
||||
Directory.CreateDirectory(FontsFolder);
|
||||
Directory.CreateDirectory(ShadersFolder);
|
||||
Directory.CreateDirectory(TexturesFolder);
|
||||
Directory.CreateDirectory(PresetsFolder);
|
||||
// we're about to download - initialize directories
|
||||
Directory.CreateDirectory(BaseDirectory);
|
||||
Directory.CreateDirectory(FontsFolder);
|
||||
Directory.CreateDirectory(ShadersFolder);
|
||||
Directory.CreateDirectory(TexturesFolder);
|
||||
Directory.CreateDirectory(PresetsFolder);
|
||||
|
||||
// check if we should download a fresh copy of the config
|
||||
// extravi may need to update the config ota, in which case we'll redownload it
|
||||
if (!File.Exists(ConfigLocation) || versionManifest is not null && App.State.Prop.ReShadeConfigVersion != versionManifest.ConfigFile)
|
||||
// check if we should download a fresh copy of the config
|
||||
// extravi may need to update the config ota, in which case we'll redownload it
|
||||
if (!File.Exists(ConfigLocation) || versionManifest is not null && App.State.Prop.ReShadeConfigVersion != versionManifest.ConfigFile)
|
||||
shouldFetchConfig = true;
|
||||
|
||||
if (shouldFetchReShade)
|
||||
{
|
||||
App.Logger.WriteLine("[ReShade::CheckModifications] Installing/Upgrading ReShade...");
|
||||
|
||||
{
|
||||
byte[] bytes = await App.HttpClient.GetByteArrayAsync($"{BaseUrl}/dxgi.zip");
|
||||
{
|
||||
byte[] bytes = await App.HttpClient.GetByteArrayAsync($"{BaseUrl}/dxgi.zip");
|
||||
using MemoryStream zipStream = new(bytes);
|
||||
using ZipArchive archive = new(zipStream);
|
||||
archive.ExtractToDirectory(Directories.Modifications, true);
|
Loading…
Reference in New Issue
Block a user