diff --git a/Glamourer/Designs/Design.cs b/Glamourer/Designs/Design.cs index 848e7d6..cf7af5d 100644 --- a/Glamourer/Designs/Design.cs +++ b/Glamourer/Designs/Design.cs @@ -280,8 +280,8 @@ public sealed class Design : DesignBase, ISavable, IDesignStandIn { var name = tok["Name"]?.ToObject(); var directory = tok["Directory"]?.ToObject(); - var enabled = tok["Enabled"]?.ToObject(); - if (name == null || directory == null || enabled == null) + var enabled = tok["Enabled"]?.ToObject() ?? false; + if (name == null || directory == null) { Glamourer.Messager.NotificationMessage("The loaded design contains an invalid mod, skipped.", NotificationType.Warning); continue; @@ -295,7 +295,7 @@ public sealed class Design : DesignBase, ISavable, IDesignStandIn settings.Add(key, value); var priority = tok["Priority"]?.ToObject() ?? 0; if (!design.AssociatedMods.TryAdd(new Mod(name, directory), - new ModSettings(settings, priority, enabled.Value, forceInherit, removeSetting))) + new ModSettings(settings, priority, enabled, forceInherit, removeSetting))) Glamourer.Messager.NotificationMessage("The loaded design contains a mod more than once, skipped.", NotificationType.Warning); } } diff --git a/Glamourer/Gui/Tabs/UnlocksTab/UnlockTable.cs b/Glamourer/Gui/Tabs/UnlocksTab/UnlockTable.cs index 2323ca2..d2297ca 100644 --- a/Glamourer/Gui/Tabs/UnlocksTab/UnlockTable.cs +++ b/Glamourer/Gui/Tabs/UnlocksTab/UnlockTable.cs @@ -194,7 +194,7 @@ public class UnlockTable : Table, IDisposable ImGui.Dummy(new Vector2(ImGui.GetFrameHeight())); ImGui.SameLine(); ImGui.AlignTextToFramePadding(); - if (ImGui.Selectable(item.Name) && !item.Id.IsBonusItem) + if (ImGui.Selectable(item.Name) && item.Id is { IsBonusItem: false, IsCustom: false }) Glamourer.Messager.Chat.Print(new SeStringBuilder().AddItemLink(item.ItemId.Id, false).BuiltString); if (ImGui.IsItemClicked(ImGuiMouseButton.Right) && _tooltip.Player(out var state))