muffin v7.38.8
This commit is contained in:
parent
5e2d8f648b
commit
3e10cbbbf2
51 changed files with 2585 additions and 1972 deletions
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Questionable.Functions;
|
||||
|
||||
namespace Questionable.Controller.DebugCommands;
|
||||
|
||||
internal sealed class UnlockLinksCommandHandler : IDebugCommandHandler
|
||||
{
|
||||
private readonly GameFunctions _gameFunctions;
|
||||
|
||||
private readonly IChatGui _chatGui;
|
||||
|
||||
private IReadOnlyList<uint> _previouslyUnlockedUnlockLinks = Array.Empty<uint>();
|
||||
|
||||
public string CommandName => "unlock-links";
|
||||
|
||||
public UnlockLinksCommandHandler(GameFunctions gameFunctions, IChatGui chatGui)
|
||||
{
|
||||
_gameFunctions = gameFunctions;
|
||||
_chatGui = chatGui;
|
||||
}
|
||||
|
||||
public void Execute(string[] arguments)
|
||||
{
|
||||
IReadOnlyList<uint> unlockLinks = _gameFunctions.GetUnlockLinks();
|
||||
if (unlockLinks.Count >= 0)
|
||||
{
|
||||
_chatGui.Print($"Saved {unlockLinks.Count} unlock links to log.", "Questionable", 576);
|
||||
List<uint> list = unlockLinks.Except(_previouslyUnlockedUnlockLinks).ToList();
|
||||
if (_previouslyUnlockedUnlockLinks.Count > 0 && list.Count > 0)
|
||||
{
|
||||
_chatGui.Print("New unlock links: " + string.Join(", ", list), "Questionable", 576);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_chatGui.PrintError("Could not query unlock links.", "Questionable", 576);
|
||||
}
|
||||
_previouslyUnlockedUnlockLinks = unlockLinks;
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
_previouslyUnlockedUnlockLinks = Array.Empty<uint>();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue