mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-19 06:17:45 +01:00
Introduce Identifiers and strong entry types for each meta manipulation and use them in the manipulations.
This commit is contained in:
parent
ceed8531af
commit
2e9f184454
27 changed files with 533 additions and 163 deletions
|
|
@ -66,7 +66,7 @@ public partial class TexToolsMeta
|
|||
foreach (var attribute in attributes)
|
||||
{
|
||||
var value = list.TryGetValue(attribute, out var tmp) ? tmp.Entry : CmpFile.GetDefault(manager, race, attribute);
|
||||
b.Write(value);
|
||||
b.Write(value.Value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ public partial class TexToolsMeta
|
|||
{
|
||||
b.Write((ushort)Names.CombinedRace(manip.Est.Gender, manip.Est.Race));
|
||||
b.Write(manip.Est.SetId.Id);
|
||||
b.Write(manip.Est.Entry);
|
||||
b.Write(manip.Est.Entry.Value);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -239,10 +239,10 @@ public partial class TexToolsMeta
|
|||
var raceCode = Names.CombinedRace(manip.Gender, manip.Race).ToRaceCode();
|
||||
return manip.Slot switch
|
||||
{
|
||||
EstManipulation.EstType.Hair => $"chara/human/c{raceCode}/obj/hair/h{manip.SetId:D4}/c{raceCode}h{manip.SetId:D4}_hir.meta",
|
||||
EstManipulation.EstType.Face => $"chara/human/c{raceCode}/obj/face/h{manip.SetId:D4}/c{raceCode}f{manip.SetId:D4}_fac.meta",
|
||||
EstManipulation.EstType.Body => $"chara/equipment/e{manip.SetId:D4}/e{manip.SetId:D4}_{EquipSlot.Body.ToSuffix()}.meta",
|
||||
EstManipulation.EstType.Head => $"chara/equipment/e{manip.SetId:D4}/e{manip.SetId:D4}_{EquipSlot.Head.ToSuffix()}.meta",
|
||||
EstType.Hair => $"chara/human/c{raceCode}/obj/hair/h{manip.SetId:D4}/c{raceCode}h{manip.SetId:D4}_hir.meta",
|
||||
EstType.Face => $"chara/human/c{raceCode}/obj/face/h{manip.SetId:D4}/c{raceCode}f{manip.SetId:D4}_fac.meta",
|
||||
EstType.Body => $"chara/equipment/e{manip.SetId:D4}/e{manip.SetId:D4}_{EquipSlot.Body.ToSuffix()}.meta",
|
||||
EstType.Head => $"chara/equipment/e{manip.SetId:D4}/e{manip.SetId:D4}_{EquipSlot.Head.ToSuffix()}.meta",
|
||||
_ => throw new ArgumentOutOfRangeException(),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue