This commit is contained in:
2025-08-22 02:19:48 +01:00
commit a4c82452be
373 changed files with 52044 additions and 0 deletions

View File

@@ -0,0 +1,99 @@
using Dalamud.Plugin;
using Penumbra.Api.Enums;
using Penumbra.Api.Helpers;
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
namespace Penumbra.Api.IpcSubscribers.Legacy;
public sealed class GetCollections(IDalamudPluginInterface pi)
: FuncSubscriber<IList<string>>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetCollections)}";
public new IList<string> Invoke()
=> base.Invoke();
}
public sealed class GetCurrentCollectionName(IDalamudPluginInterface pi)
: FuncSubscriber<string>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetCurrentCollectionName)}";
public new string Invoke()
=> base.Invoke();
}
public sealed class GetDefaultCollectionName(IDalamudPluginInterface pi)
: FuncSubscriber<string>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetDefaultCollectionName)}";
public new string Invoke()
=> base.Invoke();
}
public sealed class GetInterfaceCollectionName(IDalamudPluginInterface pi)
: FuncSubscriber<string>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetInterfaceCollectionName)}";
public new string Invoke()
=> base.Invoke();
}
public sealed class GetCharacterCollectionName(IDalamudPluginInterface pi)
: FuncSubscriber<string, (string, bool)>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetCharacterCollectionName)}";
public new (string, bool) Invoke(string characterName)
=> base.Invoke(characterName);
}
public sealed class GetChangedItems(IDalamudPluginInterface pi)
: FuncSubscriber<string, IReadOnlyDictionary<string, object?>>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetChangedItems)}";
public new IReadOnlyDictionary<string, object?> Invoke(string collectionName)
=> base.Invoke(collectionName);
}
public sealed class GetCollectionForType(IDalamudPluginInterface pi)
: FuncSubscriber<ApiCollectionType, string>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetCollectionForType)}";
public new string Invoke(ApiCollectionType collectionType)
=> base.Invoke(collectionType);
}
public sealed class SetCollectionForType(IDalamudPluginInterface pi)
: FuncSubscriber<ApiCollectionType, string, bool, bool, (PenumbraApiEc, string)>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(SetCollectionForType)}";
public new (PenumbraApiEc ErrorCode, string OldCollectionName) Invoke(ApiCollectionType collectionType, string collectionName,
bool allowCreateNew = true, bool allowDelete = true)
=> base.Invoke(collectionType, collectionName, allowCreateNew, allowDelete);
}
public sealed class GetCollectionForObject(IDalamudPluginInterface pi)
: FuncSubscriber<int, (bool, bool, string)>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetCollectionForObject)}";
public new (bool ObjectValid, bool IndividualSet, string CollectionName) Invoke(int objectIndex)
=> base.Invoke(objectIndex);
}
public sealed class SetCollectionForObject(IDalamudPluginInterface pi)
: FuncSubscriber<int, string, bool, bool, (PenumbraApiEc, string)>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(SetCollectionForObject)}";
public new (PenumbraApiEc ErrorCode, string OldCollectionName) Invoke(int objectIndex, string collectionName, bool allowCreateNew = true,
bool allowDelete = true)
=> base.Invoke(objectIndex, collectionName, allowCreateNew, allowDelete);
}

View File

@@ -0,0 +1,43 @@
using Dalamud.Plugin;
using Penumbra.Api.Enums;
using Penumbra.Api.Helpers;
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
namespace Penumbra.Api.IpcSubscribers.Legacy;
public sealed class GetDrawObjectInfo(IDalamudPluginInterface pi)
: FuncSubscriber<nint, (nint, string)>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetDrawObjectInfo)}";
public new (nint GameObjectAddress, string CollectionName) Invoke(nint drawObjectAddress)
=> base.Invoke(drawObjectAddress);
}
public sealed class SetCutsceneParentIndex(IDalamudPluginInterface pi)
: FuncSubscriber<int, int, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(SetCutsceneParentIndex)}";
public new PenumbraApiEc Invoke(int cutsceneObjectIndex, int newParentIndex)
=> base.Invoke(cutsceneObjectIndex, newParentIndex);
}
public static class CreatingCharacterBase
{
public const string Label = $"Penumbra.{nameof(CreatingCharacterBase)}";
public static EventSubscriber<nint, string, nint, nint, nint> Subscriber(IDalamudPluginInterface pi,
params Action<nint, string, nint, nint, nint>[] actions)
=> new(pi, Label, actions);
}
public static class CreatedCharacterBase
{
public const string Label = $"Penumbra.{nameof(CreatedCharacterBase)}";
public static EventSubscriber<nint, string, nint> Subscriber(IDalamudPluginInterface pi,
params Action<nint, string, nint>[] actions)
=> new(pi, Label, actions);
}

View File

@@ -0,0 +1,24 @@
using Dalamud.Plugin;
using Penumbra.Api.Helpers;
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
namespace Penumbra.Api.IpcSubscribers.Legacy;
public sealed class GetMetaManipulations(IDalamudPluginInterface pi)
: FuncSubscriber<string, string>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetMetaManipulations)}";
public new string Invoke(string objectName)
=> base.Invoke(objectName);
}
public sealed class GetGameObjectMetaManipulations(IDalamudPluginInterface pi)
: FuncSubscriber<int, string>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetGameObjectMetaManipulations)}";
public new string Invoke(int objectIndex)
=> base.Invoke(objectIndex);
}

View File

@@ -0,0 +1,92 @@
using Dalamud.Plugin;
using Penumbra.Api.Api;
using Penumbra.Api.Enums;
using Penumbra.Api.Helpers;
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
namespace Penumbra.Api.IpcSubscribers.Legacy;
using CurrentSettings = ValueTuple<PenumbraApiEc, (bool, int, IDictionary<string, IList<string>>, bool)?>;
public sealed class GetAvailableModSettings(IDalamudPluginInterface pi)
: FuncSubscriber<string, string, IDictionary<string, (IList<string>, GroupType)>?>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetAvailableModSettings)}";
public new IDictionary<string, (IList<string>, GroupType)>? Invoke(string modDirectory, string modName = "")
=> base.Invoke(modDirectory, modName);
}
public sealed class GetCurrentModSettings(IDalamudPluginInterface pi)
: FuncSubscriber<string, string, string, bool, CurrentSettings>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetCurrentModSettings)}";
public new CurrentSettings Invoke(string collectionName, string modDirectory, string modName = "", bool ignoreInheritance = false)
=> base.Invoke(collectionName, modDirectory, modName, ignoreInheritance);
}
public sealed class TryInheritMod(IDalamudPluginInterface pi)
: FuncSubscriber<string, string, string, bool, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(TryInheritMod)}";
public PenumbraApiEc Invoke(string collectionName, string modDirectory, bool inherit, string modName = "")
=> Invoke(collectionName, modDirectory, modName, inherit);
}
public sealed class TrySetMod(IDalamudPluginInterface pi)
: FuncSubscriber<string, string, string, bool, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(TrySetMod)}";
public PenumbraApiEc Invoke(string collectionName, string modDirectory, bool enabled, string modName = "")
=> Invoke(collectionName, modDirectory, modName, enabled);
}
public sealed class TrySetModPriority(IDalamudPluginInterface pi)
: FuncSubscriber<string, string, string, int, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(TrySetModPriority)}";
public PenumbraApiEc Invoke(string collectionName, string modDirectory, int priority, string modName = "")
=> Invoke(collectionName, modDirectory, modName, priority);
}
public sealed class TrySetModSetting(IDalamudPluginInterface pi)
: FuncSubscriber<string, string, string, string, string, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(TrySetModSetting)}";
public new PenumbraApiEc Invoke(string collectionName, string modDirectory, string groupName, string setting, string modName = "")
=> base.Invoke(collectionName, modDirectory, modName, groupName, setting);
}
public sealed class TrySetModSettings(IDalamudPluginInterface pi)
: FuncSubscriber<string, string, string, string, IReadOnlyList<string>, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(TrySetModSettings)}";
public PenumbraApiEc Invoke(string collectionName, string modDirectory, string groupName, IReadOnlyList<string> settings,
string modName = "")
=> Invoke(collectionName, modDirectory, modName, groupName, settings);
}
public static class ModSettingChanged
{
public const string Label = $"Penumbra.{nameof(ModSettingChanged)}.V5";
public static EventSubscriber<ModSettingChange, string, string, bool> Subscriber(IDalamudPluginInterface pi,
params Action<ModSettingChange, string, string, bool>[] actions)
=> new(pi, Label, actions);
}
public sealed class CopyModSettings(IDalamudPluginInterface pi)
: FuncSubscriber<string, string, string, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(CopyModSettings)}";
public new PenumbraApiEc Invoke(string collectionName, string modDirectoryFrom, string modDirectoryTo)
=> base.Invoke(collectionName, modDirectoryFrom, modDirectoryTo);
}

View File

@@ -0,0 +1,70 @@
using Dalamud.Plugin;
using Penumbra.Api.Enums;
using Penumbra.Api.Helpers;
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
namespace Penumbra.Api.IpcSubscribers.Legacy;
public sealed class GetMods(IDalamudPluginInterface pi)
: FuncSubscriber<IList<(string, string)>>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetMods)}";
public new IList<(string, string)> Invoke()
=> base.Invoke();
}
public sealed class ReloadMod(IDalamudPluginInterface pi)
: FuncSubscriber<string, string, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(ReloadMod)}";
public new PenumbraApiEc Invoke(string modDirectory, string modName = "")
=> base.Invoke(modDirectory, modName);
}
public sealed class InstallMod(IDalamudPluginInterface pi)
: FuncSubscriber<string, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(InstallMod)}";
public new PenumbraApiEc Invoke(string modDirectory)
=> base.Invoke(modDirectory);
}
public sealed class AddMod(IDalamudPluginInterface pi)
: FuncSubscriber<string, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(AddMod)}";
public new PenumbraApiEc Invoke(string modDirectory)
=> base.Invoke(modDirectory);
}
public sealed class DeleteMod(IDalamudPluginInterface pi)
: FuncSubscriber<string, string, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(DeleteMod)}";
public new PenumbraApiEc Invoke(string modDirectory, string modName = "")
=> base.Invoke(modDirectory, modName);
}
public sealed class GetModPath(IDalamudPluginInterface pi)
: FuncSubscriber<string, string, (PenumbraApiEc, string, bool)>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetModPath)}";
public new (PenumbraApiEc ErrorCode, string Path, bool IsDefault) Invoke(string modDirectory, string modName = "")
=> base.Invoke(modDirectory, modName);
}
public sealed class SetModPath(IDalamudPluginInterface pi)
: FuncSubscriber<string, string, string, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(SetModPath)}";
public new PenumbraApiEc Invoke(string modDirectory, string newPath, string modName = "")
=> base.Invoke(modDirectory, modName, newPath);
}

View File

@@ -0,0 +1,15 @@
using Dalamud.Plugin;
using Penumbra.Api.Helpers;
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
namespace Penumbra.Api.IpcSubscribers.Legacy;
public class ApiVersions(IDalamudPluginInterface pi)
: FuncSubscriber<(int Breaking, int Features)>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(ApiVersions)}";
public new (int Breaking, int Features) Invoke()
=> base.Invoke();
}

View File

@@ -0,0 +1,44 @@
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Plugin;
using Penumbra.Api.Enums;
using Penumbra.Api.Helpers;
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
namespace Penumbra.Api.IpcSubscribers.Legacy;
public sealed class RedrawAll(IDalamudPluginInterface pi)
: ActionSubscriber<RedrawType>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(RedrawAll)}";
public new void Invoke(RedrawType type)
=> base.Invoke(type);
}
public sealed class RedrawObject(IDalamudPluginInterface pi)
: ActionSubscriber<IGameObject, RedrawType>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(RedrawObject)}";
public new void Invoke(IGameObject gameObject, RedrawType type = RedrawType.Redraw)
=> base.Invoke(gameObject, type);
}
public sealed class RedrawObjectByIndex(IDalamudPluginInterface pi)
: ActionSubscriber<int, RedrawType>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(RedrawObjectByIndex)}";
public new void Invoke(int gameObjectIndex, RedrawType type = RedrawType.Redraw)
=> base.Invoke(gameObjectIndex, type);
}
public sealed class RedrawObjectByName(IDalamudPluginInterface pi)
: ActionSubscriber<string, RedrawType>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(RedrawObjectByName)}";
public new void Invoke(string gameObjectName, RedrawType type = RedrawType.Redraw)
=> base.Invoke(gameObjectName, type);
}

View File

@@ -0,0 +1,24 @@
using Dalamud.Plugin;
using Penumbra.Api.Helpers;
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
namespace Penumbra.Api.IpcSubscribers.Legacy;
public sealed class ResolveCharacterPath(IDalamudPluginInterface pi)
: FuncSubscriber<string, string, string>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(ResolveCharacterPath)}";
public new string Invoke(string gamePath, string characterName)
=> base.Invoke(gamePath, characterName);
}
public sealed class ReverseResolvePath(IDalamudPluginInterface pi)
: FuncSubscriber<string, string, string>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(ReverseResolvePath)}";
public new string Invoke(string gamePath, string characterName)
=> base.Invoke(gamePath, characterName);
}

View File

@@ -0,0 +1,83 @@
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<ushort[], IReadOnlyDictionary<string, string[]>?[]>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetGameObjectResourcePaths)}";
public new IReadOnlyDictionary<string, string[]>?[] Invoke(params ushort[] objectIndices)
=> base.Invoke(objectIndices);
}
public sealed class GetPlayerResourcePaths(IDalamudPluginInterface pi)
: FuncSubscriber<IReadOnlyDictionary<ushort, IReadOnlyDictionary<string, string[]>>>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetPlayerResourcePaths)}";
public new IReadOnlyDictionary<ushort, IReadOnlyDictionary<string, string[]>> Invoke()
=> base.Invoke();
}
public sealed class GetGameObjectResourcesOfType(IDalamudPluginInterface pi)
: FuncSubscriber<ResourceType, bool, ushort[], IReadOnlyDictionary<nint, (string, string, ChangedItemIcon)>?[]>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetGameObjectResourcesOfType)}";
public new IReadOnlyDictionary<nint, (string, string, ChangedItemIcon)>?[] Invoke(ResourceType type, bool withUiData = false,
params ushort[] indices)
=> base.Invoke(type, withUiData, indices);
}
public sealed class GetPlayerResourcesOfType(IDalamudPluginInterface pi)
: FuncSubscriber<ResourceType, bool, IReadOnlyDictionary<ushort, IReadOnlyDictionary<nint, (string, string, ChangedItemIcon)>>>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetPlayerResourcesOfType)}";
public new IReadOnlyDictionary<ushort, IReadOnlyDictionary<nint, (string, string, ChangedItemIcon)>> Invoke(ResourceType type,
bool withUiData = false)
=> base.Invoke(type, withUiData);
}
public sealed class GetGameObjectResourceTrees(IDalamudPluginInterface pi)
: FuncSubscriber<bool, ushort[], ResourceTree?[]>(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<bool, IReadOnlyDictionary<ushort, ResourceTree>>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(GetPlayerResourceTrees)}";
public new IReadOnlyDictionary<ushort, ResourceTree> 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<ResourceNode> 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<ResourceNode> Children { get; init; }
}

View File

@@ -0,0 +1,88 @@
using Dalamud.Plugin;
using Penumbra.Api.Enums;
using Penumbra.Api.Helpers;
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
namespace Penumbra.Api.IpcSubscribers.Legacy;
public sealed class CreateTemporaryCollection(IDalamudPluginInterface pi)
: FuncSubscriber<string, string, bool, (PenumbraApiEc, string)>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(CreateTemporaryCollection)}";
public new (PenumbraApiEc ErrorCode, string CollectionName) Invoke(string tag, string character, bool forceOverwrite)
=> base.Invoke(tag, character, forceOverwrite);
}
public sealed class RemoveTemporaryCollection(IDalamudPluginInterface pi)
: FuncSubscriber<string, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(RemoveTemporaryCollection)}";
public new PenumbraApiEc Invoke(string collectionName)
=> base.Invoke(collectionName);
}
public sealed class CreateNamedTemporaryCollection(IDalamudPluginInterface pi)
: FuncSubscriber<string, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(CreateNamedTemporaryCollection)}";
public new PenumbraApiEc Invoke(string collectionName)
=> base.Invoke(collectionName);
}
public sealed class RemoveTemporaryCollectionByName(IDalamudPluginInterface pi)
: FuncSubscriber<string, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(RemoveTemporaryCollectionByName)}";
public new PenumbraApiEc Invoke(string collectionName)
=> base.Invoke(collectionName);
}
public sealed class AssignTemporaryCollection(IDalamudPluginInterface pi)
: FuncSubscriber<string, int, bool, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(AssignTemporaryCollection)}";
public new PenumbraApiEc Invoke(string collectionName, int gameObjectIndex, bool force)
=> base.Invoke(collectionName, gameObjectIndex, force);
}
public sealed class AddTemporaryModAll(IDalamudPluginInterface pi)
: FuncSubscriber<string, Dictionary<string, string>, string, int, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(AddTemporaryModAll)}";
public new PenumbraApiEc Invoke(string tag, Dictionary<string, string> files, string meta, int priority = 0)
=> base.Invoke(tag, files, meta, priority);
}
public sealed class AddTemporaryMod(IDalamudPluginInterface pi)
: FuncSubscriber<string, string, Dictionary<string, string>, string, int, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(AddTemporaryMod)}";
public new PenumbraApiEc Invoke(string tag, string collectionName, Dictionary<string, string> files, string meta, int priority = 0)
=> base.Invoke(tag, collectionName, files, meta, priority);
}
public sealed class RemoveTemporaryModAll(IDalamudPluginInterface pi)
: FuncSubscriber<string, int, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(RemoveTemporaryModAll)}";
public new PenumbraApiEc Invoke(string tag, int priority = 0)
=> base.Invoke(tag, priority);
}
public sealed class RemoveTemporaryMod(IDalamudPluginInterface pi)
: FuncSubscriber<string, string, int, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(RemoveTemporaryMod)}";
public new PenumbraApiEc Invoke(string tag, string collectionName, int priority = 0)
=> base.Invoke(tag, collectionName, priority);
}

View File

@@ -0,0 +1,16 @@
using Dalamud.Plugin;
using Penumbra.Api.Enums;
using Penumbra.Api.Helpers;
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
namespace Penumbra.Api.IpcSubscribers.Legacy;
public sealed class OpenMainWindow(IDalamudPluginInterface pi)
: FuncSubscriber<TabType, string, string, PenumbraApiEc>(pi, Label)
{
public const string Label = $"Penumbra.{nameof(OpenMainWindow)}";
public new PenumbraApiEc Invoke(TabType tab, string modName, string modDirectory = "")
=> base.Invoke(tab, modName, modDirectory);
}