Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Knossos.NET/Models/ModSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ public bool IsDefaultConfig()
return true;
}

/// <summary>
/// Sets the filepath to the mod folder for the mod settings system, if it is not already set.
/// </summary>
/// <param name="modFullPath"></param>
public void SetInitialFilePath(string modFullPath)
{
if (filePath == null)
filePath = modFullPath + Path.DirectorySeparatorChar + "mod_settings.json";
}

/// <summary>
/// Load mod_settings.json data
/// Any new variabled must be added here or it will not be loaded
Expand Down
2 changes: 2 additions & 0 deletions Knossos.NET/ViewModels/Templates/Tasks/InstallMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,8 @@ public async Task<bool> InstallMod(Mod mod, CancellationTokenSource cancelSource
mod.ClearUnusedData();
}

mod.modSettings.SetInitialFilePath(mod.fullPath);

//We have to compress?
if (compressMod)
{
Expand Down