Skip to content

Commit

Permalink
fully finished list clear and last packages bug fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
BigSpice committed Oct 21, 2023
1 parent ba7b87d commit 4907ec0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
19 changes: 10 additions & 9 deletions VTOL_2.0.0/Pages/Page_Mods.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public List<NORTHSTARCOMPATIBLE_MOD> READ_UPDATE_MOD_LIST(DirectoryInfo[] modsTo



if (jsonObject.TryGetValue(Mod.Name.Replace("_", " ").Trim(), out JToken value))
if (jsonObject.TryGetValue(Mod.Name.Trim(), out JToken value))
{


Expand Down Expand Up @@ -446,12 +446,7 @@ public async Task Call_Mods_From_Folder()
var dirs = rootDirs.EnumerateDirectories("*", new EnumerationOptions
{ RecurseSubdirectories = false }).ToArray();

DispatchIfNecessary(async () =>
{
Mod_Count_Label.Content = VTOL.Resources.Languages.Language.Page_Mods_Call_Mods_From_Folder_ModCount + subDirs.Length;
});

if (subDirs.Count() > 0)
{
int index = 0;
Expand All @@ -467,13 +462,19 @@ public async Task Call_Mods_From_Folder()
CLEANED_FORMAT_MODS = DIRECTORY_MODS;

}
DispatchIfNecessary(async () =>
{
Mod_Count_Label.Content = VTOL.Resources.Languages.Language.Page_Mods_Call_Mods_From_Folder_ModCount + CLEANED_FORMAT_MODS.Count;
});
foreach (var Verified_Installed_Mod in CLEANED_FORMAT_MODS)
{
try
{
if (Verified_Installed_Mod.DIRECTORY_INFO != null)
{


index++;

Expand Down Expand Up @@ -946,7 +947,7 @@ public void Move_Mods(string val, bool Enable_Disable)
string jsonContent = File.ReadAllText(Json_Path);
// Parse the JSON content
JObject jsonObject = JObject.Parse(jsonContent);
string Name = val.Replace("_", " ");
string Name = val;
if (jsonObject.TryGetValue(Name, out _))
{
if (Enable_Disable != null)
Expand Down Expand Up @@ -2418,7 +2419,7 @@ protected virtual void Delete_Action(object sender, RoutedEventArgs e)


JObject jsonObject = JObject.Parse(jsonContent);
string Name = workingmod.Replace("_", " ");
string Name = workingmod;
if (jsonObject.TryGetValue(Name, out _))
{
jsonObject.Remove(Name);
Expand Down

0 comments on commit 4907ec0

Please sign in to comment.