mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-21 07:17:53 +01:00
Current state.
This commit is contained in:
parent
67305d507a
commit
98a89bb2b4
28 changed files with 606 additions and 265 deletions
|
|
@ -74,6 +74,9 @@ public class ModMetaEditor(
|
|||
dict.ClearForDefault();
|
||||
|
||||
var count = 0;
|
||||
foreach (var value in clone.GlobalEqp)
|
||||
dict.TryAdd(value);
|
||||
|
||||
foreach (var (key, value) in clone.Imc)
|
||||
{
|
||||
var defaultEntry = ImcChecker.GetDefaultEntry(key, false);
|
||||
|
|
|
|||
|
|
@ -36,9 +36,16 @@ public class ModSelection : EventWrapper<Mod?, Mod?, ModSelection.Priority>
|
|||
_communicator.ModSettingChanged.Subscribe(OnSettingChange, ModSettingChanged.Priority.ModSelection);
|
||||
}
|
||||
|
||||
public ModSettings Settings { get; private set; } = ModSettings.Empty;
|
||||
public ModCollection Collection { get; private set; } = ModCollection.Empty;
|
||||
public Mod? Mod { get; private set; }
|
||||
public ModSettings Settings { get; private set; } = ModSettings.Empty;
|
||||
public ModCollection Collection { get; private set; } = ModCollection.Empty;
|
||||
public Mod? Mod { get; private set; }
|
||||
public ModSettings? OwnSettings { get; private set; }
|
||||
|
||||
public bool IsTemporary
|
||||
=> OwnSettings != Settings;
|
||||
|
||||
public TemporaryModSettings? AsTemporarySettings
|
||||
=> Settings as TemporaryModSettings;
|
||||
|
||||
|
||||
public void SelectMod(Mod? mod)
|
||||
|
|
@ -83,12 +90,14 @@ public class ModSelection : EventWrapper<Mod?, Mod?, ModSelection.Priority>
|
|||
{
|
||||
if (Mod == null)
|
||||
{
|
||||
Settings = ModSettings.Empty;
|
||||
Collection = ModCollection.Empty;
|
||||
Settings = ModSettings.Empty;
|
||||
Collection = ModCollection.Empty;
|
||||
OwnSettings = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
(var settings, Collection) = _collections.Current[Mod.Index];
|
||||
(var settings, Collection) = _collections.Current.GetActualSettings(Mod.Index);
|
||||
OwnSettings = _collections.Current.GetOwnSettings(Mod.Index);
|
||||
Settings = settings ?? ModSettings.Empty;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Penumbra.Mods.Settings;
|
|||
public class ModSettings
|
||||
{
|
||||
public static readonly ModSettings Empty = new();
|
||||
public SettingList Settings { get; private init; } = [];
|
||||
public SettingList Settings { get; internal init; } = [];
|
||||
public ModPriority Priority { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue