diff --git a/QuestMap/Plugin.cs b/QuestMap/Plugin.cs index ee5fd87..b3ba224 100644 --- a/QuestMap/Plugin.cs +++ b/QuestMap/Plugin.cs @@ -1,31 +1,31 @@ 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; 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!; internal XivCommonBase Common { get; } internal Configuration Config { get; } @@ -35,7 +35,7 @@ namespace QuestMap { public Plugin(DalamudPluginInterface pi) { pi.Inject(this); // not sure why [PluginInterface] above aren't initialized by dalamud, but they're null - 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/PluginUi.cs b/QuestMap/PluginUi.cs index 82946fd..db007e3 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; @@ -43,7 +43,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; @@ -204,7 +204,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; } @@ -405,12 +405,12 @@ namespace QuestMap { ImGui.PopFont(); } - TextureWrap? GetIcon(uint id) { + IDalamudTextureWrap? GetIcon(uint id) { if (this.Icons.TryGetValue(id, out var wrap)) { 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; } diff --git a/QuestMap/QuestMap.csproj b/QuestMap/QuestMap.csproj index c19a3a1..90d6ca4 100755 --- a/QuestMap/QuestMap.csproj +++ b/QuestMap/QuestMap.csproj @@ -3,7 +3,7 @@ net7-windows QuestMap - 1.4.5 + 1.4.7 enable latest true @@ -33,10 +33,6 @@ $(DalamudLibPath)\ImGui.NET.dll False - - $(DalamudLibPath)\ImGuiScene.dll - False - $(DalamudLibPath)\Lumina.dll False @@ -49,9 +45,9 @@ - + - + diff --git a/QuestMap/QuestMap.yaml b/QuestMap/QuestMap.yaml index bc53f81..e5f518d 100644 --- a/QuestMap/QuestMap.yaml +++ b/QuestMap/QuestMap.yaml @@ -1,5 +1,5 @@ -name: Filtered Quest Map -author: Liza Carvelli, ascclemens +name: Quest Map +author: Liza Carvelli, 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://github.com/carvelli/FilteredQuestMap +repo_url: https://git.carvel.li/forks/annas-questmap 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, }; 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==" } } }