diff --git a/AutoRetainerAPI b/AutoRetainerAPI index 6f0aaa5..a63c8e7 160000 --- a/AutoRetainerAPI +++ b/AutoRetainerAPI @@ -1 +1 @@ -Subproject commit 6f0aaa55bce6ec79fd4d72f84f21597b39e5445d +Subproject commit a63c8e7154e272374ffa03d5c801736d4229e38a diff --git a/ECommons b/ECommons index f11764e..11fd2f0 160000 --- a/ECommons +++ b/ECommons @@ -1 +1 @@ -Subproject commit f11764e4654148c5d891273053ec02649a5ee9c5 +Subproject commit 11fd2f06e1374e846e1aada06071da5fc7ef697a diff --git a/KitchenSink/Commands/CharacterSwitch.cs b/KitchenSink/Commands/CharacterSwitch.cs index 8d549cd..605793a 100644 --- a/KitchenSink/Commands/CharacterSwitch.cs +++ b/KitchenSink/Commands/CharacterSwitch.cs @@ -8,7 +8,6 @@ using Dalamud.Game.Command; using Dalamud.Game.Gui.Dtr; using Dalamud.Game.Text; using Dalamud.Interface.ImGuiNotification; -using Dalamud.Interface.Internal.Notifications; using Dalamud.Plugin.Services; using FFXIVClientStructs.FFXIV.Client.UI; @@ -25,7 +24,7 @@ internal sealed class CharacterSwitch : IDisposable private readonly INotificationManager _notificationManager; private readonly ICondition _condition; private readonly IPluginLog _pluginLog; - private readonly DtrBarEntry _dtrBarEntry; + private readonly IDtrBarEntry _dtrBarEntry; public CharacterSwitch(AutoRetainerApi autoRetainerApi, ICommandManager commandManager, IClientState clientState, IChatGui chatGui, INotificationManager notificationManager, IDtrBar dtrBar, ICondition condition, @@ -189,11 +188,11 @@ internal sealed class CharacterSwitch : IDisposable var previous = FindCharacter(-1, showError: false); var next = FindCharacter(1, showError: false); if (previous != null && next != null) - _dtrBarEntry.Tooltip = $"Prev: {previous.Name}\nNext: {next.Name}"; + _dtrBarEntry.Tooltip = $"Prev: {previous.ToString(homeWorld)}\nNext: {next.ToString(homeWorld)}"; else if (previous != null) - _dtrBarEntry.Tooltip = $"Prev: {previous.Name}"; + _dtrBarEntry.Tooltip = $"Prev: {previous.ToString(homeWorld)}"; else if (next != null) - _dtrBarEntry.Tooltip = $"Next: {next.Name}"; + _dtrBarEntry.Tooltip = $"Next: {next.ToString(homeWorld)}"; else _dtrBarEntry.Tooltip = null; } @@ -207,7 +206,7 @@ internal sealed class CharacterSwitch : IDisposable public void Dispose() { _clientState.Login -= UpdateDtrBar; - _dtrBarEntry.Dispose(); + _dtrBarEntry.Remove(); _commandManager.RemoveHandler("/ks"); _commandManager.RemoveHandler("/k-"); _commandManager.RemoveHandler("/k+"); @@ -216,5 +215,10 @@ internal sealed class CharacterSwitch : IDisposable private sealed record Target(string Name, string World) { public override string ToString() => $"{Name}@{World}"; + + public string ToString(string? currentWorld) + { + return currentWorld != World ? ToString() : Name; + } } } diff --git a/KitchenSink/Commands/DropboxQueue.cs b/KitchenSink/Commands/DropboxQueue.cs index aef4935..5239201 100644 --- a/KitchenSink/Commands/DropboxQueue.cs +++ b/KitchenSink/Commands/DropboxQueue.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Diagnostics.CodeAnalysis; using System.Linq; using Dalamud.Game.Command; @@ -27,7 +28,7 @@ internal sealed class DropboxQueue : IDisposable private readonly IChatGui _chatGui; private readonly DropboxApi _dropboxApi; - public DropboxQueue(DalamudPluginInterface pluginInterface, ICommandManager commandManager, IChatGui chatGui, + public DropboxQueue(IDalamudPluginInterface pluginInterface, ICommandManager commandManager, IChatGui chatGui, IPluginLog pluginLog) { _commandManager = commandManager; @@ -137,7 +138,7 @@ internal sealed class DropboxQueue : IDisposable _dropboxApi.BeginTrade(); } - private IReadOnlyList? ParseArguments(string arguments) + private ReadOnlyCollection? ParseArguments(string arguments) { var parsedItems = arguments.Split(' ') .Select(x => x.Split(':')) @@ -191,15 +192,15 @@ internal sealed class DropboxQueue : IDisposable for (int i = 0; i < container->Size; ++i) { var item = container->GetInventorySlot(i); - if (item != null && item->ItemID != 0) + if (item != null && item->ItemId != 0) { if (item->Spiritbond > 0) continue; - if (!allItems.TryGetValue(item->ItemID, out ItemCount? itemCount)) + if (!allItems.TryGetValue(item->ItemId, out ItemCount? itemCount)) itemCount = new(0, 0); - if (item->Flags.HasFlag(InventoryItem.ItemFlags.HQ)) + if (item->Flags.HasFlag(InventoryItem.ItemFlags.HighQuality)) itemCount = itemCount with { HighQualityQuantity = itemCount.HighQualityQuantity + (int)item->Quantity @@ -210,7 +211,7 @@ internal sealed class DropboxQueue : IDisposable NormalQualityQuantity = itemCount.NormalQualityQuantity + (int)item->Quantity }; - allItems[item->ItemID] = itemCount; + allItems[item->ItemId] = itemCount; } } } @@ -237,7 +238,7 @@ internal sealed class DropboxQueue : IDisposable private readonly ICallGateSubscriber _getItemQuantity; private readonly ICallGateSubscriber _setItemQuantity; - public DropboxApi(DalamudPluginInterface pluginInterface, IPluginLog pluginLog) + public DropboxApi(IDalamudPluginInterface pluginInterface, IPluginLog pluginLog) { _pluginLog = pluginLog; diff --git a/KitchenSink/KitchenSink.csproj b/KitchenSink/KitchenSink.csproj index 93cfa81..4c02419 100644 --- a/KitchenSink/KitchenSink.csproj +++ b/KitchenSink/KitchenSink.csproj @@ -1,65 +1,15 @@ - + - net8.0-windows - 0.5 - 12 - enable - true - false - false + 1.0 dist - true - $(SolutionDir)=X:\ - true - portable - - $(appdata)\XIVLauncher\addon\Hooks\dev\ - - - - $(DALAMUD_HOME)/ - - - - - - - - - $(DalamudLibPath)Dalamud.dll - false - - - $(DalamudLibPath)ImGui.NET.dll - false - - - $(DalamudLibPath)Lumina.dll - false - - - $(DalamudLibPath)Lumina.Excel.dll - false - - - $(DalamudLibPath)Newtonsoft.Json.dll - false - - - $(DalamudLibPath)FFXIVClientStructs.dll - false - - + + - - - - diff --git a/KitchenSink/KitchenSinkPlugin.cs b/KitchenSink/KitchenSinkPlugin.cs index 597976c..d3e0c05 100644 --- a/KitchenSink/KitchenSinkPlugin.cs +++ b/KitchenSink/KitchenSinkPlugin.cs @@ -15,7 +15,7 @@ internal sealed class KitchenSinkPlugin : IDalamudPlugin private readonly CharacterSwitch _characterSwitch; private readonly DropboxQueue _dropboxQueue; - public KitchenSinkPlugin(DalamudPluginInterface pluginInterface, ICommandManager commandManager, + public KitchenSinkPlugin(IDalamudPluginInterface pluginInterface, ICommandManager commandManager, IClientState clientState, IChatGui chatGui, INotificationManager notificationManager, IDtrBar dtrBar, ICondition condition, IPluginLog pluginLog) { diff --git a/KitchenSink/packages.lock.json b/KitchenSink/packages.lock.json index d008061..21e8554 100644 --- a/KitchenSink/packages.lock.json +++ b/KitchenSink/packages.lock.json @@ -4,21 +4,92 @@ "net8.0-windows7.0": { "DalamudPackager": { "type": "Direct", - "requested": "[2.1.12, )", - "resolved": "2.1.12", - "contentHash": "Sc0PVxvgg4NQjcI8n10/VfUQBAS4O+Fw2pZrAqBdRMbthYGeogzu5+xmIGCGmsEZ/ukMOBuAqiNiB5qA3MRalg==" + "requested": "[2.1.13, )", + "resolved": "2.1.13", + "contentHash": "rMN1omGe8536f4xLMvx9NwfvpAc9YFFfeXJ1t4P4PE6Gu8WCIoFliR1sh07hM+bfODmesk/dvMbji7vNI+B/pQ==" + }, + "DotNet.ReproducibleBuilds": { + "type": "Direct", + "requested": "[1.1.1, )", + "resolved": "1.1.1", + "contentHash": "+H2t/t34h6mhEoUvHi8yGXyuZ2GjSovcGYehJrS2MDm2XgmPfZL2Sdxg+uL2lKgZ4M6tTwKHIlxOob2bgh0NRQ==", + "dependencies": { + "Microsoft.SourceLink.AzureRepos.Git": "1.1.1", + "Microsoft.SourceLink.Bitbucket.Git": "1.1.1", + "Microsoft.SourceLink.GitHub": "1.1.1", + "Microsoft.SourceLink.GitLab": "1.1.1" + } + }, + "Microsoft.SourceLink.Gitea": { + "type": "Direct", + "requested": "[8.0.0, )", + "resolved": "8.0.0", + "contentHash": "KOBodmDnlWGIqZt2hT47Q69TIoGhIApDVLCyyj9TT5ct8ju16AbHYcB4XeknoHX562wO1pMS/1DfBIZK+V+sxg==", + "dependencies": { + "Microsoft.Build.Tasks.Git": "8.0.0", + "Microsoft.SourceLink.Common": "8.0.0" + } + }, + "Microsoft.Build.Tasks.Git": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ==" + }, + "Microsoft.SourceLink.AzureRepos.Git": { + "type": "Transitive", + "resolved": "1.1.1", + "contentHash": "qB5urvw9LO2bG3eVAkuL+2ughxz2rR7aYgm2iyrB8Rlk9cp2ndvGRCvehk3rNIhRuNtQaeKwctOl1KvWiklv5w==", + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, + "Microsoft.SourceLink.Bitbucket.Git": { + "type": "Transitive", + "resolved": "1.1.1", + "contentHash": "cDzxXwlyWpLWaH0em4Idj0H3AmVo3L/6xRXKssYemx+7W52iNskj/SQ4FOmfCb8YQt39otTDNMveCZzYtMoucQ==", + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, + "Microsoft.SourceLink.Common": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw==" + }, + "Microsoft.SourceLink.GitHub": { + "type": "Transitive", + "resolved": "1.1.1", + "contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==", + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } + }, + "Microsoft.SourceLink.GitLab": { + "type": "Transitive", + "resolved": "1.1.1", + "contentHash": "tvsg47DDLqqedlPeYVE2lmiTpND8F0hkrealQ5hYltSmvruy/Gr5nHAKSsjyw5L3NeM/HLMI5ORv7on/M4qyZw==", + "dependencies": { + "Microsoft.Build.Tasks.Git": "1.1.1", + "Microsoft.SourceLink.Common": "1.1.1" + } }, "autoretainerapi": { "type": "Project", "dependencies": { - "ECommons": "[2.2.0.1, )" + "ECommons": "[2.2.0.2, )" } }, "ecommons": { "type": "Project" }, "llib": { - "type": "Project" + "type": "Project", + "dependencies": { + "DalamudPackager": "[2.1.13, )" + } } } } diff --git a/LLib b/LLib index 3792244..93fac6e 160000 --- a/LLib +++ b/LLib @@ -1 +1 @@ -Subproject commit 3792244261a9f5426a7916f5a6dd1966238ba84a +Subproject commit 93fac6efb01a1272192d929fd863328271512ea4