@@ -30,6 +30,7 @@ public partial class FormMain : Form
30
30
31
31
private ListViewItem selected = null ;
32
32
private Config config ;
33
+ private SemVersion currentListVersion ;
33
34
34
35
private GitHubBasedUpdateCheck updateCheck = new GitHubBasedUpdateCheck ( "CodeStix" , "Beat-Modder" , "Installer/latestVersion.txt" ) ;
35
36
@@ -190,6 +191,7 @@ private void FormMain_Load(object sender, EventArgs e)
190
191
await beatSaber . InstallMultipleMods ( wasManuallyInstalled , ProgressReport . Partial ( progress , 0.35f , 0.1f ) ) ;
191
192
await beatSaber . UninstallMultipleMods ( wasManuallyUninstalled , true , ProgressReport . Partial ( progress , 0.45f , 0.1f ) ) ;
192
193
194
+ currentListVersion = beatSaber . BeatSaberVersion ;
193
195
UpdateModList ( ) ;
194
196
195
197
ProgressChange ( "List of mods has been refreshed." , 0.55f ) ;
@@ -206,6 +208,13 @@ private void FormMain_Load(object sender, EventArgs e)
206
208
207
209
await beatSaber . RunIPA ( revert : false , wait : config . showConsole , shown : config . showConsole ) ;
208
210
211
+ // API moves old plugins to a folder, we don't do that here.
212
+ string movedDirectory = Path . Combine ( beatSaber . BeatSaberDirectory , $ "Old { beatSaber . PreviousBeatSaberVersionString } Plugins") ;
213
+ if ( Directory . Exists ( movedDirectory ) )
214
+ {
215
+ MessageBox . Show ( "Files where moved by API" ) ;
216
+ }
217
+
209
218
ProgressChange ( "Patched Beat Saber!" , 0.6f ) ;
210
219
}
211
220
@@ -222,6 +231,16 @@ private void FormMain_Load(object sender, EventArgs e)
222
231
textBoxBeatSaberLocation . Text = config . beatSaberLocation ;
223
232
labelBeatSaberVersion . ForeColor = Color . Green ;
224
233
labelBeatSaberVersion . Text = $ "Beat Saber version: { beatSaber . BeatSaberVersionString } ";
234
+ foreach ( string version in beatMods . AllGameVersions )
235
+ {
236
+ var tti = buttonSwitchListVersion . DropDownItems . Add ( version ) ;
237
+ tti . Click += ( sender2 , e2 ) =>
238
+ {
239
+ currentListVersion = SemVersion . Parse ( tti . Text . FixOddVersion ( ) ) ;
240
+ UpdateModList ( ) ;
241
+ } ;
242
+ }
243
+
225
244
} ) ) ;
226
245
227
246
config . firstTime = false ;
@@ -326,8 +345,8 @@ private async void uninstallToolStripMenuItem_Click(object sender, EventArgs e)
326
345
327
346
if ( mod . preventRemoval )
328
347
{
329
- MessageBox . Show ( $ "Removal of '{ mod . ToString ( ) } ' was canceled because " +
330
- $ "this plugin is required for all mods to work.\n If you want to remove all mods, please go to the settings tab.", "Uninstall canceled ." ,
348
+ MessageBox . Show ( $ "Removal of '{ mod . ToString ( ) } ' was cancelled because " +
349
+ $ "this plugin is required for all mods to work.\n If you want to remove all mods, please go to the settings tab.", "Uninstall cancelled ." ,
331
350
MessageBoxButtons . OK , MessageBoxIcon . Exclamation ) ;
332
351
return ;
333
352
}
@@ -336,7 +355,7 @@ private async void uninstallToolStripMenuItem_Click(object sender, EventArgs e)
336
355
{
337
356
MessageBox . Show ( $ "You are willing to remove '{ mod . ToString ( ) } ', please not that this mod is currently being used by { mod . usedBy . Count } other mods:\n \n " +
338
357
string . Join ( "\n " , mod . usedBy ) +
339
- $ "\n \n You must first uninstall the mods above to succeed uninstalling this mod!", "Uninstall canceled ." , MessageBoxButtons . OK , MessageBoxIcon . Exclamation ) ;
358
+ $ "\n \n You must first uninstall the mods above to succeed uninstalling this mod!", "Uninstall cancelled ." , MessageBoxButtons . OK , MessageBoxIcon . Exclamation ) ;
340
359
return ;
341
360
}
342
361
@@ -700,7 +719,7 @@ private void UpdateModList()
700
719
. GetModsSortedBy ( BeatModsSort . None )
701
720
. OnlyKeepStatus ( checkBoxAllowNonApproved . Checked ? ModStatus . All : ModStatus . Approved )
702
721
. OnlyKeepMostRecentMods ( )
703
- . OnlyKeepCompatibleWith ( beatSaber . BeatSaberVersion )
722
+ . OnlyKeepCompatibleWith ( currentListVersion )
704
723
. Where ( ( e ) => ! beatSaber . IsInstalledExactVersion ( e ) ) )
705
724
{
706
725
ListViewItem lvi = new ListViewItem ( new string [ ]
@@ -825,6 +844,11 @@ private void ButtonListOfflineMods_Click(object sender, EventArgs e)
825
844
fls . ShowDialog ( ) ;
826
845
827
846
}
847
+
848
+ private void ButtonSwitchListVersion_ButtonClick ( object sender , EventArgs e )
849
+ {
850
+ buttonSwitchListVersion . ShowDropDown ( ) ;
851
+ }
828
852
}
829
853
830
854
[ Serializable ]
0 commit comments