Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Limiana committed Jun 22, 2024
1 parent 47f635f commit 5ed804a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions DynamicBridge/DynamicBridge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public DynamicBridge(DalamudPluginInterface pi)
{
P = this;
ECommonsMain.Init(pi, this, Module.DalamudReflector);
PatreonBanner.IsOfficialPlugin = Utils.IsDisguise;
ECommonsMain.IsOfficialPlugin = Utils.IsDisguise;
new TickScheduler(() =>
{
C = EzConfig.Init<Config>();
Expand Down Expand Up @@ -167,7 +167,7 @@ private void OnCommand(string command, string arguments)
var profile = Utils.Profile();
if (profile != null)
{
profile.Presets.Each(x => x.IsStatic = false);
profile.GetPresetsListUnion().Each(x => x.Each(z => z.IsStatic = false));
Notify.Success(Lang.UsingDynamicRulesNow);
P.ForceUpdate = true;
}
Expand Down
2 changes: 1 addition & 1 deletion DynamicBridge/DynamicBridge.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Authors>NightmareXIV</Authors>
<Version>1.0.5.9</Version>
<Version>1.0.6.0</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
9 changes: 6 additions & 3 deletions DynamicBridge/Gui/GuiRules.cs
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,15 @@ void FiltersSelection()
ImGui.SameLine();
}
ImGui.PushStyleColor(ImGuiCol.Text, EColor.CyanBright);
DrawSelector(Lang.CurrentEmote.Params(id, cond.Name.ExtractText())+"##{cond.RowId}", cond.RowId, rule.Emotes, rule.Not.Emotes);
DrawSelector(
Lang.CurrentEmote
.Params(cond.RowId, cond.Name.ExtractText().NullWhenEmpty() ?? $"Unnamed")
+"##{cond.RowId}", cond.RowId, rule.Emotes, rule.Not.Emotes);
ImGui.PopStyleColor();
ImGui.Separator();
}

foreach (var cond in Svc.Data.GetExcelSheet<Emote>().Where(e => e.Name?.ExtractText().IsNullOrEmpty() == false || e.Icon != 0))
foreach (var cond in Svc.Data.GetExcelSheet<Emote>().Where(e => e.Name?.ExtractText().IsNullOrEmpty() == false || e.Icon != 0 || rule.Emotes.Contains(e.RowId)))
{
var name = cond.Name?.ExtractText() ?? "";
if (Filters[filterCnt].Length > 0 && !name.Contains(Filters[filterCnt], StringComparison.OrdinalIgnoreCase)) continue;
Expand All @@ -409,7 +412,7 @@ void FiltersSelection()
ImGui.Image(texture.ImGuiHandle, iconSize);
ImGui.SameLine();
}
DrawSelector($"{name}##{cond.RowId}", cond.RowId, rule.Emotes, rule.Not.Emotes);
DrawSelector($"{name.NullWhenEmpty() ?? $"Unnamed/{cond.RowId}"}##{cond.RowId}", cond.RowId, rule.Emotes, rule.Not.Emotes);
}
ImGui.EndCombo();
}
Expand Down
3 changes: 3 additions & 0 deletions DynamicBridge/IPC/Glamourer/GlamourerManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public void RevertToAutomation()
}

private ApplyDesign ApplyDesign = new(Svc.PluginInterface);

public void ApplyByGuid(Guid guid)
{
try
Expand Down Expand Up @@ -88,6 +89,7 @@ public void ApplyToSelf(GlamourerDesignInfo design)
try
{
ApplyByGuid(design.Identifier);
//Commands.ApplyByGuid(design.Identifier);
}
catch (Exception e)
{
Expand All @@ -101,6 +103,7 @@ public void Revert()
{
try
{
//Commands.Revert();
RevertState.Invoke(0);
}
catch (Exception e)
Expand Down
1 change: 0 additions & 1 deletion DynamicBridge/Utils.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Dalamud.Memory;
using DynamicBridge.Configuration;
using DynamicBridge.IPC.Honorific;
using ECommons.ExcelServices;
using ECommons.GameFunctions;
using ECommons.GameHelpers;
Expand Down

0 comments on commit 5ed804a

Please sign in to comment.