forked from aly/qstbak
28 lines
693 B
C#
28 lines
693 B
C#
using Questionable.Model.Questing;
|
|
using Questionable.Windows;
|
|
|
|
namespace Questionable.Controller.DebugCommands;
|
|
|
|
internal sealed class SequencesCommandHandler : IDebugCommandHandler
|
|
{
|
|
private readonly QuestSequenceWindow _questSequenceWindow;
|
|
|
|
public string CommandName => "seq";
|
|
|
|
public SequencesCommandHandler(QuestSequenceWindow questSequenceWindow)
|
|
{
|
|
_questSequenceWindow = questSequenceWindow;
|
|
}
|
|
|
|
public void Execute(string[] arguments)
|
|
{
|
|
if (arguments.Length >= 1 && ElementId.TryFromString(arguments[0], out ElementId elementId) && elementId != null)
|
|
{
|
|
_questSequenceWindow.OpenForQuest(elementId);
|
|
}
|
|
else
|
|
{
|
|
_questSequenceWindow.ToggleOrUncollapse();
|
|
}
|
|
}
|
|
}
|