Skip to content

Commit abfd8c9

Browse files
committed
Fix stuff
1 parent 6338725 commit abfd8c9

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

AppInfo.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,15 @@ private void OnProductInfo(SteamApps.PICSProductInfoCallback callback) {
8888
return;
8989

9090
// not sure if this is game specific or applies to other games
91-
var manifest = callback?.Apps[APPID]?.KeyValues.Children
91+
var _manifest = callback?.Apps[APPID]?.KeyValues.Children
9292
.FirstOrDefault(x => x.Name == "depots")?.Children
9393
.FirstOrDefault(x => x.Name == DEPOT_ID.ToString())?.Children
9494
.FirstOrDefault(x => x.Name == "manifests")?.Children
95-
.FirstOrDefault(x => x.Name == "public")?.Value;
95+
.FirstOrDefault(x => x.Name == "public");
96+
97+
var manifest = _manifest?.Value != null ?
98+
_manifest?.Value :
99+
_manifest.Children.FirstOrDefault(x => x.Name == "gid")?.Value;
96100

97101
if(manifest?.Length >= 16)
98102
manifestId = manifest;

BeatSaberNoUpdate.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<UseWindowsForms>true</UseWindowsForms>
77
<ApplicationIcon>bsskip.ico</ApplicationIcon>
88
<Authors>Kinsi55</Authors>
9-
<Version>1.1.4</Version>
9+
<Version>1.1.5</Version>
1010
</PropertyGroup>
1111

1212
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">

Form1.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,16 @@ private void applyButton_Click(object sender, EventArgs e) {
121121
}
122122

123123
if(!Regex.IsMatch(textbox_manifest.Text, "[0-9]{16,19}")) {
124-
Bad("The Manifest ID you entered is incorrect. It should be a 19 digit number. Make sure to not accidently enter any spaces");
124+
Bad("The Manifest ID you entered is incorrect. It should be a 16-19 digit number. Make sure to not accidently enter any spaces");
125125
return;
126126
}
127127

128+
#if !DEBUG
128129
if(Process.GetProcesses().Any(x => x.ProcessName.ToLower() == "steam")) {
129130
Bad("Steam seems to be running, please exit it to apply the patch");
130131
return;
131132
}
133+
#endif
132134

133135
var p = Path.Combine(textbox_path.Text, "..", "..", "appmanifest_620980.acf");
134136

@@ -146,7 +148,7 @@ private void applyButton_Click(object sender, EventArgs e) {
146148
if(checkBox1.Checked)
147149
SetKv(ref acf, "AutoUpdateBehavior", "1");
148150

149-
acf = Regex.Replace(acf, "(\"" + AppInfo.DEPOT_ID + "\".*?\"manifest\"\\s*?)\"[0-9]{16,19}\"", $"$1\"{textbox_manifest.Text}\"", RegexOptions.Singleline | RegexOptions.IgnoreCase);
151+
acf = Regex.Replace(acf, "(\"InstalledDepots\".*?\"" + AppInfo.DEPOT_ID + "\".*?\"manifest\"\\s*?)\"[0-9]{16,19}\"", $"$1\"{textbox_manifest.Text}\"", RegexOptions.Singleline | RegexOptions.IgnoreCase);
150152

151153
File.WriteAllText(p, acf);
152154

0 commit comments

Comments
 (0)