using Dalamud.Plugin;
using Penumbra.Api.Api;
using Penumbra.Api.Helpers;
namespace Penumbra.Api.IpcSubscribers;
///
public sealed class ResolveDefaultPath(IDalamudPluginInterface pi)
: FuncSubscriber(pi, Label)
{
/// The label.
public const string Label = $"Penumbra.{nameof(ResolveDefaultPath)}";
///
public new string Invoke(string gamePath)
=> base.Invoke(gamePath);
/// Create a provider.
public static FuncProvider Provider(IDalamudPluginInterface pi, IPenumbraApiResolve api)
=> new(pi, Label, api.ResolveDefaultPath);
}
///
public sealed class ResolveInterfacePath(IDalamudPluginInterface pi)
: FuncSubscriber(pi, Label)
{
/// The label.
public const string Label = $"Penumbra.{nameof(ResolveInterfacePath)}";
///
public new string Invoke(string gamePath)
=> base.Invoke(gamePath);
/// Create a provider.
public static FuncProvider Provider(IDalamudPluginInterface pi, IPenumbraApiResolve api)
=> new(pi, Label, api.ResolveInterfacePath);
}
///
public sealed class ResolveGameObjectPath(IDalamudPluginInterface pi)
: FuncSubscriber(pi, Label)
{
/// The label.
public const string Label = $"Penumbra.{nameof(ResolveGameObjectPath)}";
///
public new string Invoke(string gamePath, int gameObjectIdx)
=> base.Invoke(gamePath, gameObjectIdx);
/// Create a provider.
public static FuncProvider Provider(IDalamudPluginInterface pi, IPenumbraApiResolve api)
=> new(pi, Label, api.ResolveGameObjectPath);
}
///
public sealed class ResolvePlayerPath(IDalamudPluginInterface pi)
: FuncSubscriber(pi, Label)
{
/// The label.
public const string Label = $"Penumbra.{nameof(ResolvePlayerPath)}";
///
public new string Invoke(string gamePath)
=> base.Invoke(gamePath);
/// Create a provider.
public static FuncProvider Provider(IDalamudPluginInterface pi, IPenumbraApiResolve api)
=> new(pi, Label, api.ResolvePlayerPath);
}
///
public sealed class ReverseResolveGameObjectPath(IDalamudPluginInterface pi)
: FuncSubscriber(pi, Label)
{
/// The label.
public const string Label = $"Penumbra.{nameof(ReverseResolveGameObjectPath)}";
///
public new string[] Invoke(string gamePath, int gameObjectIdx)
=> base.Invoke(gamePath, gameObjectIdx);
/// Create a provider.
public static FuncProvider Provider(IDalamudPluginInterface pi, IPenumbraApiResolve api)
=> new(pi, Label, api.ReverseResolveGameObjectPath);
}
///
public sealed class ReverseResolvePlayerPath(IDalamudPluginInterface pi)
: FuncSubscriber(pi, Label)
{
/// The label.
public const string Label = $"Penumbra.{nameof(ReverseResolvePlayerPath)}";
///
public new string[] Invoke(string gamePath)
=> base.Invoke(gamePath);
/// Create a provider.
public static FuncProvider Provider(IDalamudPluginInterface pi, IPenumbraApiResolve api)
=> new(pi, Label, api.ReverseResolvePlayerPath);
}
///
public sealed class ResolvePlayerPaths(IDalamudPluginInterface pi)
: FuncSubscriber(pi, Label)
{
/// The label.
public const string Label = $"Penumbra.{nameof(ResolvePlayerPaths)}";
///
public new (string[], string[][]) Invoke(string[] forward, string[] reverse)
=> base.Invoke(forward, reverse);
/// Create a provider.
public static FuncProvider Provider(IDalamudPluginInterface pi, IPenumbraApiResolve api)
=> new(pi, Label, api.ResolvePlayerPaths);
}
///
public sealed class ResolvePlayerPathsAsync(IDalamudPluginInterface pi)
: FuncSubscriber>(pi, Label)
{
/// The label.
public const string Label = $"Penumbra.{nameof(ResolvePlayerPathsAsync)}";
///
public new Task<(string[], string[][])> Invoke(string[] forward, string[] reverse)
=> base.Invoke(forward, reverse);
/// Create a provider.
public static FuncProvider> Provider(IDalamudPluginInterface pi, IPenumbraApiResolve api)
=> new(pi, Label, api.ResolvePlayerPathsAsync);
}