From cfb78de6164b45b5d85a226948aa147b2eadd643 Mon Sep 17 00:00:00 2001 From: Anna Date: Sun, 3 Sep 2023 18:04:08 -0400 Subject: [PATCH 1/5] refactor: use new ITextureProvider --- QuestMap/Plugin.cs | 4 ++++ QuestMap/PluginUi.cs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/QuestMap/Plugin.cs b/QuestMap/Plugin.cs index 7f6de49..148b93e 100644 --- a/QuestMap/Plugin.cs +++ b/QuestMap/Plugin.cs @@ -5,6 +5,7 @@ using Dalamud.Game.Command; using Dalamud.Game.Gui; using Dalamud.IoC; using Dalamud.Plugin; +using Dalamud.Plugin.Services; using XivCommon; namespace QuestMap { @@ -27,6 +28,9 @@ namespace QuestMap { [PluginService] internal GameGui GameGui { get; init; } = null!; + [PluginService] + internal ITextureProvider TextureProvider { get; init; } = null!; + internal XivCommonBase Common { get; } internal Configuration Config { get; } internal Quests Quests { get; } diff --git a/QuestMap/PluginUi.cs b/QuestMap/PluginUi.cs index 7fa210e..0031892 100644 --- a/QuestMap/PluginUi.cs +++ b/QuestMap/PluginUi.cs @@ -403,7 +403,7 @@ namespace QuestMap { return wrap; } - wrap = this.Plugin.DataManager.GetImGuiTextureIcon(this.Plugin.ClientState.ClientLanguage, id); + wrap = this.Plugin.TextureProvider.GetIcon(id); if (wrap != null) { this.Icons[id] = wrap; } From fae049bbf6ec8b12395fbce48389a8da263debe7 Mon Sep 17 00:00:00 2001 From: Anna Date: Sun, 3 Sep 2023 18:04:19 -0400 Subject: [PATCH 2/5] chore: bump version to 1.4.6 --- QuestMap/QuestMap.csproj | 2 +- QuestMap/QuestMap.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/QuestMap/QuestMap.csproj b/QuestMap/QuestMap.csproj index c19a3a1..d5790cd 100755 --- a/QuestMap/QuestMap.csproj +++ b/QuestMap/QuestMap.csproj @@ -3,7 +3,7 @@ net7-windows QuestMap - 1.4.5 + 1.4.6 enable latest true diff --git a/QuestMap/QuestMap.yaml b/QuestMap/QuestMap.yaml index 6a4440d..1fed2a1 100644 --- a/QuestMap/QuestMap.yaml +++ b/QuestMap/QuestMap.yaml @@ -1,5 +1,5 @@ name: Quest Map -author: ascclemens +author: Anna punchline: Explore quests and their rewards. description: |- Explore quests and their rewards. @@ -11,4 +11,4 @@ description: |- Icons: treasure map by Anthony Ledoux from the Noun Project and locked book by Anthony Ledoux from the Noun Project -repo_url: https://git.annaclemens.io/ascclemens/QuestMap +repo_url: https://git.anna.lgbt/anna/QuestMap From 7883004ece061e5fffcefa6eec7dee5486e1d9cc Mon Sep 17 00:00:00 2001 From: Anna Date: Thu, 28 Sep 2023 02:48:18 -0400 Subject: [PATCH 3/5] refactor: update for api 9 --- QuestMap/Plugin.cs | 14 +++++--------- QuestMap/PluginUi.cs | 8 ++++---- QuestMap/QuestMap.csproj | 4 ---- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/QuestMap/Plugin.cs b/QuestMap/Plugin.cs index 148b93e..1fdc54e 100644 --- a/QuestMap/Plugin.cs +++ b/QuestMap/Plugin.cs @@ -1,8 +1,4 @@ using System.Threading.Channels; -using Dalamud.Data; -using Dalamud.Game.ClientState; -using Dalamud.Game.Command; -using Dalamud.Game.Gui; using Dalamud.IoC; using Dalamud.Plugin; using Dalamud.Plugin.Services; @@ -11,22 +7,22 @@ using XivCommon; namespace QuestMap { // ReSharper disable once ClassNeverInstantiated.Global internal class Plugin : IDalamudPlugin { - public string Name => "Quest Map"; + internal static string Name => "Quest Map"; [PluginService] internal DalamudPluginInterface Interface { get; init; } = null!; [PluginService] - internal ClientState ClientState { get; init; } = null!; + internal IClientState ClientState { get; init; } = null!; [PluginService] - internal CommandManager CommandManager { get; init; } = null!; + internal ICommandManager CommandManager { get; init; } = null!; [PluginService] - internal DataManager DataManager { get; init; } = null!; + internal IDataManager DataManager { get; init; } = null!; [PluginService] - internal GameGui GameGui { get; init; } = null!; + internal IGameGui GameGui { get; init; } = null!; [PluginService] internal ITextureProvider TextureProvider { get; init; } = null!; diff --git a/QuestMap/PluginUi.cs b/QuestMap/PluginUi.cs index 0031892..380ff8f 100644 --- a/QuestMap/PluginUi.cs +++ b/QuestMap/PluginUi.cs @@ -9,8 +9,8 @@ using Dalamud; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling.Payloads; using Dalamud.Interface; +using Dalamud.Interface.Internal; using ImGuiNET; -using ImGuiScene; using Lumina.Data; using Lumina.Excel; using Lumina.Excel.GeneratedSheets; @@ -41,7 +41,7 @@ namespace QuestMap { private ChannelReader GraphChannel { get; } private CancellationTokenSource? CancellationTokenSource { get; set; } private HashSet InfoWindows { get; } = new(); - private Dictionary Icons { get; } = new(); + private Dictionary Icons { get; } = new(); private List<(Quest, bool, string)> FilteredQuests { get; } = new(); internal bool Show; @@ -198,7 +198,7 @@ namespace QuestMap { ImGui.SetNextWindowSize(new Vector2(675, 600), ImGuiCond.FirstUseEver); - if (!ImGui.Begin(this.Plugin.Name, ref this.Show, ImGuiWindowFlags.MenuBar)) { + if (!ImGui.Begin(Plugin.Name, ref this.Show, ImGuiWindowFlags.MenuBar)) { ImGui.End(); return; } @@ -398,7 +398,7 @@ namespace QuestMap { ImGui.PopFont(); } - TextureWrap? GetIcon(uint id) { + IDalamudTextureWrap? GetIcon(uint id) { if (this.Icons.TryGetValue(id, out var wrap)) { return wrap; } diff --git a/QuestMap/QuestMap.csproj b/QuestMap/QuestMap.csproj index d5790cd..a22dbd5 100755 --- a/QuestMap/QuestMap.csproj +++ b/QuestMap/QuestMap.csproj @@ -33,10 +33,6 @@ $(DalamudLibPath)\ImGui.NET.dll False - - $(DalamudLibPath)\ImGuiScene.dll - False - $(DalamudLibPath)\Lumina.dll False From b2001ac0d5aaa0dc7929ed8f37a0dc6f7c7af764 Mon Sep 17 00:00:00 2001 From: Anna Date: Tue, 3 Oct 2023 18:16:08 -0400 Subject: [PATCH 4/5] feat: add new msq --- QuestMap/Quests.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/QuestMap/Quests.cs b/QuestMap/Quests.cs index cfd887d..9925bf3 100644 --- a/QuestMap/Quests.cs +++ b/QuestMap/Quests.cs @@ -252,6 +252,8 @@ namespace QuestMap { 70062 => "Newfound Adventure (6.1)", 70136 => "Buried Memory (6.2)", 70214 => "Gods Revel, Lands Tremble (6.3)", + 70279 => "The Dark Throne (6.4)", + 70286 => "Growing Light (6.5)", _ => null, }; From 61702e638d262c14b03231cb7110df2ee0867c56 Mon Sep 17 00:00:00 2001 From: Anna Date: Tue, 3 Oct 2023 17:39:42 -0400 Subject: [PATCH 5/5] chore: bump version to 1.4.7 --- QuestMap/Plugin.cs | 2 +- QuestMap/QuestMap.csproj | 6 +++--- QuestMap/packages.lock.json | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) mode change 100755 => 100644 QuestMap/packages.lock.json diff --git a/QuestMap/Plugin.cs b/QuestMap/Plugin.cs index 1fdc54e..9dd21bc 100644 --- a/QuestMap/Plugin.cs +++ b/QuestMap/Plugin.cs @@ -34,7 +34,7 @@ namespace QuestMap { private Commands Commands { get; } public Plugin() { - this.Common = new XivCommonBase(); + this.Common = new XivCommonBase(this.Interface); this.Config = this.Interface.GetPluginConfig() as Configuration ?? new Configuration(); var graphChannel = Channel.CreateUnbounded(); diff --git a/QuestMap/QuestMap.csproj b/QuestMap/QuestMap.csproj index a22dbd5..90d6ca4 100755 --- a/QuestMap/QuestMap.csproj +++ b/QuestMap/QuestMap.csproj @@ -3,7 +3,7 @@ net7-windows QuestMap - 1.4.6 + 1.4.7 enable latest true @@ -45,9 +45,9 @@ - + - + diff --git a/QuestMap/packages.lock.json b/QuestMap/packages.lock.json old mode 100755 new mode 100644 index 73ad707..47af76d --- a/QuestMap/packages.lock.json +++ b/QuestMap/packages.lock.json @@ -10,9 +10,9 @@ }, "DalamudPackager": { "type": "Direct", - "requested": "[2.1.10, )", - "resolved": "2.1.10", - "contentHash": "S6NrvvOnLgT4GDdgwuKVJjbFo+8ZEj+JsEYk9ojjOR/MMfv1dIFpT8aRJQfI24rtDcw1uF+GnSSMN4WW1yt7fw==" + "requested": "[2.1.12, )", + "resolved": "2.1.12", + "contentHash": "Sc0PVxvgg4NQjcI8n10/VfUQBAS4O+Fw2pZrAqBdRMbthYGeogzu5+xmIGCGmsEZ/ukMOBuAqiNiB5qA3MRalg==" }, "System.Threading.Channels": { "type": "Direct", @@ -22,9 +22,9 @@ }, "XivCommon": { "type": "Direct", - "requested": "[7.0.0-alpha.1, )", - "resolved": "7.0.0-alpha.1", - "contentHash": "4Yy4Wg3bnI/g9BSEYAqOZALmVMJZS0wcP847VlUIThBqIS/47O6tw2BI84he4KuPSTfIsYOzrcz3vAia8+Pn3g==" + "requested": "[9.0.0, )", + "resolved": "9.0.0", + "contentHash": "avaBp3FmSCi/PiQhntCeBDYOHejdyTWmFtz4pRBVQQ8vHkmRx+YTk1la9dkYBMlXxRXKckEdH1iI1Fu61JlE7w==" } } }