mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-31 21:03:48 +01:00
Add some early support for IMC groups.
This commit is contained in:
parent
d47d31b665
commit
df6eb3fdd2
15 changed files with 360 additions and 146 deletions
|
|
@ -146,7 +146,7 @@ public readonly struct ImcManipulation : IMetaManipulation<ImcManipulation>
|
|||
public bool Apply(ImcFile file)
|
||||
=> file.SetEntry(ImcFile.PartIndex(EquipSlot), Variant.Id, Entry);
|
||||
|
||||
public bool Validate()
|
||||
public bool Validate(bool withMaterial)
|
||||
{
|
||||
switch (ObjectType)
|
||||
{
|
||||
|
|
@ -178,7 +178,7 @@ public readonly struct ImcManipulation : IMetaManipulation<ImcManipulation>
|
|||
break;
|
||||
}
|
||||
|
||||
if (Entry.MaterialId == 0)
|
||||
if (withMaterial && Entry.MaterialId == 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public readonly struct MetaManipulation : IEquatable<MetaManipulation>, ICompara
|
|||
return;
|
||||
case ImcManipulation m:
|
||||
Imc = m;
|
||||
ManipulationType = m.Validate() ? Type.Imc : Type.Unknown;
|
||||
ManipulationType = m.Validate(true) ? Type.Imc : Type.Unknown;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -108,7 +108,7 @@ public readonly struct MetaManipulation : IEquatable<MetaManipulation>, ICompara
|
|||
{
|
||||
return ManipulationType switch
|
||||
{
|
||||
Type.Imc => Imc.Validate(),
|
||||
Type.Imc => Imc.Validate(true),
|
||||
Type.Eqdp => Eqdp.Validate(),
|
||||
Type.Eqp => Eqp.Validate(),
|
||||
Type.Est => Est.Validate(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue