Skip to content

Commit

Permalink
bugfix: mod settings were not read correctly from json
Browse files Browse the repository at this point in the history
  • Loading branch information
cech12 committed Jan 12, 2021
1 parent abb3074 commit 688f938
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DigglesModManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.3.0.%2a</ApplicationVersion>
<ApplicationVersion>1.3.1.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
Expand Down
10 changes: 8 additions & 2 deletions FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,19 @@ private void ReadMods()
var modDirectories = (new DirectoryInfo($"{Paths.ModPath}\\{Paths.ModDirectoryName}")).GetDirectories();
foreach (var modInfo in modDirectories)
{
var modObject = new Mod(modInfo.Name);
var active = true;
var modObject = activeMods.Find(mod => mod.ModDirectoryName.Equals(modInfo.Name));
if (modObject == null)
{
active = false;
modObject = new Mod(modInfo.Name);
}
ListViewItem listViewItem = new ListViewItem(modObject.ToString(), "")
{
Tag = modObject
};
listViewItem.ToolTipText = modObject.GetToolTipText();
if (activeMods.Exists(mod => mod.ModDirectoryName.Equals(modInfo.Name)))
if (active)
{
activeModsListView.Items.Add(listViewItem);
}
Expand Down
2 changes: 1 addition & 1 deletion Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
//
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben.
[assembly: AssemblyVersion("1.2.1.*")]
[assembly: AssemblyVersion("1.3.1.*")]

0 comments on commit 688f938

Please sign in to comment.