mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-30 12:23:42 +01:00
Add ability to update configuration of associated mod
This commit is contained in:
parent
10962cac6c
commit
fb7a92b72a
2 changed files with 57 additions and 3 deletions
|
|
@ -273,6 +273,16 @@ public sealed class DesignManager : DesignEditor
|
|||
DesignChanged.Invoke(DesignChanged.Type.RemovedMod, design, (mod, settings));
|
||||
}
|
||||
|
||||
public void UpdateMod(Design design, Mod mod, ModSettings settings) {
|
||||
if (!design.AssociatedMods.ContainsKey(mod))
|
||||
return;
|
||||
design.AssociatedMods[mod] = settings;
|
||||
design.LastEdit = DateTimeOffset.UtcNow;
|
||||
SaveService.QueueSave(design);
|
||||
Glamourer.Log.Debug($"Updated associated mod {mod.DirectoryName} from design {design.Identifier}.");
|
||||
DesignChanged.Invoke(DesignChanged.Type.AddedMod, design, (mod, settings));
|
||||
}
|
||||
|
||||
/// <summary> Set the write protection status of a design. </summary>
|
||||
public void SetWriteProtection(Design design, bool value)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue