Add some early support for IMC groups.

This commit is contained in:
Ottermandias 2024-05-16 18:30:40 +02:00
parent d47d31b665
commit df6eb3fdd2
15 changed files with 360 additions and 146 deletions

View file

@ -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;

View file

@ -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(),