mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-13 12:14:17 +01:00
Order meta entries.
This commit is contained in:
parent
96f0479b53
commit
3549283769
7 changed files with 38 additions and 13 deletions
|
|
@ -61,7 +61,10 @@ public sealed class EqdpMetaDrawer(ModMetaEditor editor, MetaFileManager metaFil
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IEnumerable<(EqdpIdentifier, EqdpEntryInternal)> Enumerate()
|
protected override IEnumerable<(EqdpIdentifier, EqdpEntryInternal)> Enumerate()
|
||||||
=> Editor.Eqdp.Select(kvp => (kvp.Key, kvp.Value));
|
=> Editor.Eqdp.OrderBy(kvp => kvp.Key.SetId)
|
||||||
|
.ThenBy(kvp => kvp.Key.GenderRace)
|
||||||
|
.ThenBy(kvp => kvp.Key.Slot)
|
||||||
|
.Select(kvp => (kvp.Key, kvp.Value));
|
||||||
|
|
||||||
private static bool DrawIdentifierInput(ref EqdpIdentifier identifier)
|
private static bool DrawIdentifierInput(ref EqdpIdentifier identifier)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,10 @@ public sealed class EqpMetaDrawer(ModMetaEditor editor, MetaFileManager metaFile
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IEnumerable<(EqpIdentifier, EqpEntryInternal)> Enumerate()
|
protected override IEnumerable<(EqpIdentifier, EqpEntryInternal)> Enumerate()
|
||||||
=> Editor.Eqp.Select(kvp => (kvp.Key, kvp.Value));
|
=> Editor.Eqp
|
||||||
|
.OrderBy(kvp => kvp.Key.SetId)
|
||||||
|
.ThenBy(kvp => kvp.Key.Slot)
|
||||||
|
.Select(kvp => (kvp.Key, kvp.Value));
|
||||||
|
|
||||||
private static bool DrawIdentifierInput(ref EqpIdentifier identifier)
|
private static bool DrawIdentifierInput(ref EqpIdentifier identifier)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,11 @@ public sealed class EstMetaDrawer(ModMetaEditor editor, MetaFileManager metaFile
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IEnumerable<(EstIdentifier, EstEntry)> Enumerate()
|
protected override IEnumerable<(EstIdentifier, EstEntry)> Enumerate()
|
||||||
=> Editor.Est.Select(kvp => (kvp.Key, kvp.Value));
|
=> Editor.Est
|
||||||
|
.OrderBy(kvp => kvp.Key.SetId)
|
||||||
|
.ThenBy(kvp => kvp.Key.GenderRace)
|
||||||
|
.ThenBy(kvp => kvp.Key.Slot)
|
||||||
|
.Select(kvp => (kvp.Key, kvp.Value));
|
||||||
|
|
||||||
private static bool DrawIdentifierInput(ref EstIdentifier identifier)
|
private static bool DrawIdentifierInput(ref EstIdentifier identifier)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,10 @@ public sealed class GlobalEqpMetaDrawer(ModMetaEditor editor, MetaFileManager me
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IEnumerable<(GlobalEqpManipulation, byte)> Enumerate()
|
protected override IEnumerable<(GlobalEqpManipulation, byte)> Enumerate()
|
||||||
=> Editor.GlobalEqp.Select(identifier => (identifier, (byte)0));
|
=> Editor.GlobalEqp
|
||||||
|
.OrderBy(identifier => identifier.Type)
|
||||||
|
.ThenBy(identifier => identifier.Condition)
|
||||||
|
.Select(identifier => (identifier, (byte)0));
|
||||||
|
|
||||||
private static void DrawIdentifierInput(ref GlobalEqpManipulation identifier)
|
private static void DrawIdentifierInput(ref GlobalEqpManipulation identifier)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,9 @@ public sealed class GmpMetaDrawer(ModMetaEditor editor, MetaFileManager metaFile
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IEnumerable<(GmpIdentifier, GmpEntry)> Enumerate()
|
protected override IEnumerable<(GmpIdentifier, GmpEntry)> Enumerate()
|
||||||
=> Editor.Gmp.Select(kvp => (kvp.Key, kvp.Value));
|
=> Editor.Gmp
|
||||||
|
.OrderBy(kvp => kvp.Key.SetId)
|
||||||
|
.Select(kvp => (kvp.Key, kvp.Value));
|
||||||
|
|
||||||
private static bool DrawIdentifierInput(ref GmpIdentifier identifier)
|
private static bool DrawIdentifierInput(ref GmpIdentifier identifier)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,14 @@ public sealed class ImcMetaDrawer(ModMetaEditor editor, MetaFileManager metaFile
|
||||||
|
|
||||||
|
|
||||||
protected override IEnumerable<(ImcIdentifier, ImcEntry)> Enumerate()
|
protected override IEnumerable<(ImcIdentifier, ImcEntry)> Enumerate()
|
||||||
=> Editor.Imc.Select(kvp => (kvp.Key, kvp.Value));
|
=> Editor.Imc
|
||||||
|
.OrderBy(kvp => kvp.Key.ObjectType)
|
||||||
|
.ThenBy(kvp => kvp.Key.PrimaryId)
|
||||||
|
.ThenBy(kvp => kvp.Key.EquipSlot)
|
||||||
|
.ThenBy(kvp => kvp.Key.BodySlot)
|
||||||
|
.ThenBy(kvp => kvp.Key.SecondaryId)
|
||||||
|
.ThenBy(kvp => kvp.Key.Variant)
|
||||||
|
.Select(kvp => (kvp.Key, kvp.Value));
|
||||||
|
|
||||||
public static bool DrawObjectType(ref ImcIdentifier identifier, float width = 110)
|
public static bool DrawObjectType(ref ImcIdentifier identifier, float width = 110)
|
||||||
{
|
{
|
||||||
|
|
@ -149,18 +156,18 @@ public sealed class ImcMetaDrawer(ModMetaEditor editor, MetaFileManager metaFile
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
var equipSlot = type switch
|
var (equipSlot, secondaryId) = type switch
|
||||||
{
|
{
|
||||||
ObjectType.Equipment => identifier.EquipSlot.IsEquipment() ? identifier.EquipSlot : EquipSlot.Head,
|
ObjectType.Equipment => (identifier.EquipSlot.IsEquipment() ? identifier.EquipSlot : EquipSlot.Head, (SecondaryId) 0),
|
||||||
ObjectType.DemiHuman => identifier.EquipSlot.IsEquipment() ? identifier.EquipSlot : EquipSlot.Head,
|
ObjectType.DemiHuman => (identifier.EquipSlot.IsEquipment() ? identifier.EquipSlot : EquipSlot.Head, identifier.SecondaryId == 0 ? 1 : identifier.SecondaryId),
|
||||||
ObjectType.Accessory => identifier.EquipSlot.IsAccessory() ? identifier.EquipSlot : EquipSlot.Ears,
|
ObjectType.Accessory => (identifier.EquipSlot.IsAccessory() ? identifier.EquipSlot : EquipSlot.Ears, (SecondaryId)0),
|
||||||
_ => EquipSlot.Unknown,
|
_ => (EquipSlot.Unknown, identifier.SecondaryId == 0 ? 1 : identifier.SecondaryId),
|
||||||
};
|
};
|
||||||
identifier = identifier with
|
identifier = identifier with
|
||||||
{
|
{
|
||||||
ObjectType = type,
|
ObjectType = type,
|
||||||
EquipSlot = equipSlot,
|
EquipSlot = equipSlot,
|
||||||
SecondaryId = identifier.SecondaryId == 0 ? 1 : identifier.SecondaryId,
|
SecondaryId = secondaryId,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,10 @@ public sealed class RspMetaDrawer(ModMetaEditor editor, MetaFileManager metaFile
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IEnumerable<(RspIdentifier, RspEntry)> Enumerate()
|
protected override IEnumerable<(RspIdentifier, RspEntry)> Enumerate()
|
||||||
=> Editor.Rsp.Select(kvp => (kvp.Key, kvp.Value));
|
=> Editor.Rsp
|
||||||
|
.OrderBy(kvp => kvp.Key.SubRace)
|
||||||
|
.ThenBy(kvp => kvp.Key.Attribute)
|
||||||
|
.Select(kvp => (kvp.Key, kvp.Value));
|
||||||
|
|
||||||
private static bool DrawIdentifierInput(ref RspIdentifier identifier)
|
private static bool DrawIdentifierInput(ref RspIdentifier identifier)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue