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

View File

@@ -0,0 +1,97 @@
namespace Penumbra.Api.Enums;
public enum ApiCollectionType : byte
{
Yourself = 0,
MalePlayerCharacter,
FemalePlayerCharacter,
MaleNonPlayerCharacter,
FemaleNonPlayerCharacter,
NonPlayerChild,
NonPlayerElderly,
MaleMidlander,
FemaleMidlander,
MaleHighlander,
FemaleHighlander,
MaleWildwood,
FemaleWildwood,
MaleDuskwight,
FemaleDuskwight,
MalePlainsfolk,
FemalePlainsfolk,
MaleDunesfolk,
FemaleDunesfolk,
MaleSeekerOfTheSun,
FemaleSeekerOfTheSun,
MaleKeeperOfTheMoon,
FemaleKeeperOfTheMoon,
MaleSeawolf,
FemaleSeawolf,
MaleHellsguard,
FemaleHellsguard,
MaleRaen,
FemaleRaen,
MaleXaela,
FemaleXaela,
MaleHelion,
FemaleHelion,
MaleLost,
FemaleLost,
MaleRava,
FemaleRava,
MaleVeena,
FemaleVeena,
MaleMidlanderNpc,
FemaleMidlanderNpc,
MaleHighlanderNpc,
FemaleHighlanderNpc,
MaleWildwoodNpc,
FemaleWildwoodNpc,
MaleDuskwightNpc,
FemaleDuskwightNpc,
MalePlainsfolkNpc,
FemalePlainsfolkNpc,
MaleDunesfolkNpc,
FemaleDunesfolkNpc,
MaleSeekerOfTheSunNpc,
FemaleSeekerOfTheSunNpc,
MaleKeeperOfTheMoonNpc,
FemaleKeeperOfTheMoonNpc,
MaleSeawolfNpc,
FemaleSeawolfNpc,
MaleHellsguardNpc,
FemaleHellsguardNpc,
MaleRaenNpc,
FemaleRaenNpc,
MaleXaelaNpc,
FemaleXaelaNpc,
MaleHelionNpc,
FemaleHelionNpc,
MaleLostNpc,
FemaleLostNpc,
MaleRavaNpc,
FemaleRavaNpc,
MaleVeenaNpc,
FemaleVeenaNpc,
Default = 0xE0,
Interface = 0xE1,
Current = 0xE2,
}

View File

@@ -0,0 +1,23 @@
namespace Penumbra.Api.Enums;
public enum ChangedItemIcon : uint
{
None = 0,
Unknown = 1,
Head = 2,
Body = 3,
Hands = 4,
Legs = 5,
Feet = 6,
Ears = 7,
Neck = 8,
Wrists = 9,
Finger = 10,
Mainhand = 11,
Offhand = 12,
Customization = 13,
Monster = 14,
Demihuman = 15,
Action = 16,
Emote = 17,
}

View File

@@ -0,0 +1,17 @@
namespace Penumbra.Api.Enums;
/// <summary>
/// Describes known types of changed items that could provide special care.
/// </summary>
public enum ChangedItemType
{
None = 0,
Item = 1,
Action = 2,
Customization = 3,
ItemOffhand = 4,
Unknown = 5,
Emote = 6,
Model = 7,
CustomArmor = 8,
}

View File

@@ -0,0 +1,39 @@
namespace Penumbra.Api.Enums;
/// <summary>
/// The selection type for mod option groups.
/// </summary>
public enum GroupType
{
/// <summary>
/// Exactly one option of this group has to be selected (if any exist).
/// </summary>
Single,
/// <summary>
/// Any number of options in this group can be toggled on or off at the same time.
/// Limits the number of options in a single group to 32 at the most.
/// Each option is its own data container, which are independent of each other.
/// </summary>
Multi,
/// <summary>
/// Any number of options in this group can be toggled on or off at the same time.
/// Affects a single IMC entry, to manipulate different parts of a model in a user-facing way.
/// </summary>
Imc,
/// <summary>
/// Any number of options in this group can be toggled on or off at the same time.
/// Limits the number of options in a single group to 8 at the most.
/// Each combination of options is its own data container, resulting in 2^N separate data containers.
/// </summary>
Combining,
/// <summary>
/// A group consisting of multiple separate subgroups where the options can depend on each other.
/// Each subgroup behaves the same way as its regular group type, just with optional dependencies on the other options.
/// The total number of options is still limited by the settings bit size.
/// </summary>
Complex,
}

View File

@@ -0,0 +1,34 @@
namespace Penumbra.Api.Enums;
/// <summary>
/// Describes the way a mod can change its settings.
/// </summary>
public enum ModSettingChange
{
/// <summary> It was set to inherit from other collections or not to inherit anymore. </summary>
Inheritance,
/// <summary> It was enabled or disabled. </summary>
EnableState,
/// <summary> Its priority was changed. </summary>
Priority,
/// <summary> A specific setting for an option group was changed. </summary>
Setting,
/// <summary> Multiple mods were set to inherit from other collections or not inherit anymore at once. </summary>
MultiInheritance,
/// <summary> Multiple mods were enabled or disabled at once. </summary>
MultiEnableState,
/// <summary> A temporary mod was enabled or disabled. </summary>
TemporaryMod,
/// <summary> A mod was edited. Only invoked on edits affecting the current players collection and for that for now. </summary>
Edited,
/// <summary> A temporary setting was added, removed or changed. </summary>
TemporarySetting,
}

View File

@@ -0,0 +1,12 @@
namespace Penumbra.Api.Enums;
/// <summary>
/// Describes which mouse button was used to click an element.
/// </summary>
public enum MouseButton
{
None,
Left,
Right,
Middle,
}

View File

@@ -0,0 +1,33 @@
namespace Penumbra.Api.Enums;
/// <summary>
/// Error codes returned by some Penumbra.Api calls.
/// </summary>
public enum PenumbraApiEc
{
Success = 0,
NothingChanged = 1,
CollectionMissing = 2,
ModMissing = 3,
OptionGroupMissing = 4,
OptionMissing = 5,
CharacterCollectionExists = 6,
LowerPriority = 7,
InvalidGamePath = 8,
FileMissing = 9,
InvalidManipulation = 10,
InvalidArgument = 11,
PathRenameFailed = 12,
CollectionExists = 13,
AssignmentCreationDisallowed = 14,
AssignmentDeletionDisallowed = 15,
InvalidIdentifier = 16,
SystemDisposed = 17,
AssignmentDeletionFailed = 18,
TemporarySettingDisallowed = 19,
TemporarySettingImpossible = 20,
UnknownError = 255,
}

View File

@@ -0,0 +1,11 @@
namespace Penumbra.Api.Enums;
/// <summary>
/// The way a specific game object shall be redrawn.
/// Actors can be redrawn immediately or after GPose.
/// </summary>
public enum RedrawType
{
Redraw,
AfterGPose,
}

View File

@@ -0,0 +1,79 @@
namespace Penumbra.Api.Enums;
public enum ResourceType : uint
{
Unknown = 0,
Aet = 0x00616574,
Amb = 0x00616D62,
Atch = 0x61746368,
Atex = 0x61746578,
Avfx = 0x61766678,
Awt = 0x00617774,
Bklb = 0x626B6C62,
Cmp = 0x00636D70,
Cutb = 0x63757462,
Dic = 0x00646963,
Eanb = 0x65616E62,
Eid = 0x00656964,
Envb = 0x656E7662,
Eqdp = 0x65716470,
Eqp = 0x00657170,
Eslb = 0x65736C63,
Essb = 0x65737362,
Est = 0x00657374,
Evp = 0x00657670,
Exd = 0x00657864,
Exh = 0x00657868,
Exl = 0x0065786C,
Fdt = 0x00666474,
Fpeb = 0x66706562,
Gfd = 0x00676664,
Ggd = 0x00676764,
Gmp = 0x00676D70,
Gzd = 0x00677A64,
Imc = 0x00696D63,
Kdb = 0x006B6462,
Kdlb = 0x6B646C62,
Lcb = 0x006C6362,
Lgb = 0x006C6762,
Luab = 0x6C756162,
Lvb = 0x006C7662,
Mdl = 0x006D646C,
Mlt = 0x006D6C74,
Mtrl = 0x6D74726C,
Obsb = 0x6F627362,
Pap = 0x00706170,
Pbd = 0x00706264,
Pcb = 0x00706362,
Phyb = 0x70687962,
Plt = 0x00706C74,
Scd = 0x00736364,
Sgb = 0x00736762,
Shcd = 0x73686364,
Shpk = 0x7368706B,
Sklb = 0x736B6C62,
Skp = 0x00736B70,
Stm = 0x0073746D,
Svb = 0x00737662,
Tera = 0x74657261,
Tex = 0x00746578,
Tmb = 0x00746D62,
Ugd = 0x00756764,
Uld = 0x00756C64,
Waoe = 0x77616F65,
Wtd = 0x00777464,
}
public static class ResourceTypeExtensions
{
public static ResourceType FromExtension(ReadOnlySpan<byte> ext)
=> ext.Length switch
{
0 => ResourceType.Unknown,
1 => (ResourceType)(ext[0] | 32),
2 => (ResourceType)(ext[0] | 32 | ((ext[1] | 32) << 8)),
3 => (ResourceType)(ext[0] | 32 | ((ext[1] | 32) << 8) | ((ext[2] | 32) << 16)),
4 => (ResourceType)(ext[0] | 32 | ((ext[1] | 32) << 8) | ((ext[2] | 32) << 16) | ((ext[2] | 32) << 24)),
_ => ResourceType.Unknown,
};
}

View File

@@ -0,0 +1,19 @@
namespace Penumbra.Api.Enums;
/// <summary>
/// The different tabs of the main window that are available.
/// </summary>
public enum TabType
{
None = -1,
Settings = 0,
Mods = 1,
Collections = 2,
ChangedItems = 3,
EffectiveChanges = 4,
ResourceWatcher = 5,
Debug = 6,
ResourceManager = 7,
OnScreen = 8,
Messages = 9,
}

View File

@@ -0,0 +1,37 @@
namespace Penumbra.Api.Enums;
/// <summary>
/// The different types of textures a given texture can be converted to.
/// </summary>
public enum TextureType
{
/// <summary> Convert the texture to .png. </summary>
Png = 0,
/// <summary> Keep the texture format as it is but save as .tex. </summary>
AsIsTex = 1,
/// <summary> Keep the texture format as it is but save as .dds. </summary>
AsIsDds = 2,
/// <summary> Convert the texture to RGBA32 and save as .tex. </summary>
RgbaTex = 3,
/// <summary> Convert the texture to RGBA32 and save as .dds. </summary>
RgbaDds = 4,
/// <summary> Convert the texture to BC3 and save as .tex. </summary>
Bc3Tex = 5,
/// <summary> Convert the texture to BC3 and save as .dds. </summary>
Bc3Dds = 6,
/// <summary> Convert the texture to BC3 and save as .tex. </summary>
Bc7Tex = 7,
/// <summary> Convert the texture to BC3 and save as .dds. </summary>
Bc7Dds = 8,
/// <summary> Convert the texture to .tga. </summary>
Targa = 9,
}