mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2026-02-07 00:14:38 +01:00
Fix minor issues.
This commit is contained in:
parent
f8ca572d38
commit
4d466fb7eb
2 changed files with 4 additions and 4 deletions
|
|
@ -280,8 +280,8 @@ public sealed class Design : DesignBase, ISavable, IDesignStandIn
|
|||
{
|
||||
var name = tok["Name"]?.ToObject<string>();
|
||||
var directory = tok["Directory"]?.ToObject<string>();
|
||||
var enabled = tok["Enabled"]?.ToObject<bool>();
|
||||
if (name == null || directory == null || enabled == null)
|
||||
var enabled = tok["Enabled"]?.ToObject<bool>() ?? 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<int>() ?? 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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ public class UnlockTable : Table<EquipItem>, 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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue