using Dalamud.Plugin; using Penumbra.Api.Enums; using Penumbra.Api.Helpers; using ResourceType = Penumbra.Api.Enums.ResourceType; #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member namespace Penumbra.Api.IpcSubscribers.Legacy; public sealed class GetGameObjectResourcePaths(IDalamudPluginInterface pi) : FuncSubscriber?[]>(pi, Label) { public const string Label = $"Penumbra.{nameof(GetGameObjectResourcePaths)}"; public new IReadOnlyDictionary?[] Invoke(params ushort[] objectIndices) => base.Invoke(objectIndices); } public sealed class GetPlayerResourcePaths(IDalamudPluginInterface pi) : FuncSubscriber>>(pi, Label) { public const string Label = $"Penumbra.{nameof(GetPlayerResourcePaths)}"; public new IReadOnlyDictionary> Invoke() => base.Invoke(); } public sealed class GetGameObjectResourcesOfType(IDalamudPluginInterface pi) : FuncSubscriber?[]>(pi, Label) { public const string Label = $"Penumbra.{nameof(GetGameObjectResourcesOfType)}"; public new IReadOnlyDictionary?[] Invoke(ResourceType type, bool withUiData = false, params ushort[] indices) => base.Invoke(type, withUiData, indices); } public sealed class GetPlayerResourcesOfType(IDalamudPluginInterface pi) : FuncSubscriber>>(pi, Label) { public const string Label = $"Penumbra.{nameof(GetPlayerResourcesOfType)}"; public new IReadOnlyDictionary> Invoke(ResourceType type, bool withUiData = false) => base.Invoke(type, withUiData); } public sealed class GetGameObjectResourceTrees(IDalamudPluginInterface pi) : FuncSubscriber(pi, Label) { public const string Label = $"Penumbra.{nameof(GetGameObjectResourceTrees)}"; public new ResourceTree?[] Invoke(bool withUiData = false, params ushort[] indices) => base.Invoke(withUiData, indices); } public sealed class GetPlayerResourceTrees(IDalamudPluginInterface pi) : FuncSubscriber>(pi, Label) { public const string Label = $"Penumbra.{nameof(GetPlayerResourceTrees)}"; public new IReadOnlyDictionary Invoke(bool withUiData = false) => base.Invoke(withUiData); } public record ResourceTree { public required string Name { get; init; } public required ushort RaceCode { get; init; } public required List Nodes { get; init; } } public record ResourceNode { public required ResourceType Type { get; init; } public required ChangedItemIcon Icon { get; init; } public required string? Name { get; init; } public required string? GamePath { get; init; } public required string ActualPath { get; init; } public required nint ObjectAddress { get; init; } public required nint ResourceHandle { get; init; } public required List Children { get; init; } }