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,50 @@
|
|||
using Dalamud.Plugin.Services;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.Questing;
|
||||
using Questionable.Windows;
|
||||
|
||||
namespace Questionable.Controller.DebugCommands;
|
||||
|
||||
internal sealed class DebugOverlayCommandHandler : IDebugCommandHandler
|
||||
{
|
||||
private readonly DebugOverlay _debugOverlay;
|
||||
|
||||
private readonly QuestRegistry _questRegistry;
|
||||
|
||||
private readonly IChatGui _chatGui;
|
||||
|
||||
public string CommandName => "do";
|
||||
|
||||
public DebugOverlayCommandHandler(DebugOverlay debugOverlay, QuestRegistry questRegistry, IChatGui chatGui)
|
||||
{
|
||||
_debugOverlay = debugOverlay;
|
||||
_questRegistry = questRegistry;
|
||||
_chatGui = chatGui;
|
||||
}
|
||||
|
||||
public void Execute(string[] arguments)
|
||||
{
|
||||
ElementId elementId;
|
||||
if (!_debugOverlay.DrawConditions())
|
||||
{
|
||||
_chatGui.PrintError("You don't have the debug overlay enabled.", "Questionable", 576);
|
||||
}
|
||||
else if (arguments.Length >= 1 && ElementId.TryFromString(arguments[0], out elementId) && elementId != null)
|
||||
{
|
||||
if (_questRegistry.TryGetQuest(elementId, out Quest quest))
|
||||
{
|
||||
_debugOverlay.HighlightedQuest = quest.Id;
|
||||
_chatGui.Print($"Set highlighted quest to {elementId} ({quest.Info.Name}).", "Questionable", 576);
|
||||
}
|
||||
else
|
||||
{
|
||||
_chatGui.PrintError($"Unknown quest {elementId}.", "Questionable", 576);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_debugOverlay.HighlightedQuest = null;
|
||||
_chatGui.Print("Cleared highlighted quest.", "Questionable", 576);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue