mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 18:27:24 +01:00
Set Order for customize again.
This commit is contained in:
parent
44a65f61fb
commit
d81a6b7f6f
2 changed files with 15 additions and 14 deletions
|
|
@ -248,19 +248,6 @@ public class CustomizeSet
|
|||
public CharaMakeParams.MenuType Type(CustomizeIndex index)
|
||||
=> Types[(int)index];
|
||||
|
||||
internal static IReadOnlyDictionary<CharaMakeParams.MenuType, CustomizeIndex[]> ComputeOrder(CustomizeSet set)
|
||||
{
|
||||
var ret = Enum.GetValues<CustomizeIndex>().ToArray();
|
||||
ret[(int)CustomizeIndex.TattooColor] = CustomizeIndex.EyeColorLeft;
|
||||
ret[(int)CustomizeIndex.EyeColorLeft] = CustomizeIndex.EyeColorRight;
|
||||
ret[(int)CustomizeIndex.EyeColorRight] = CustomizeIndex.TattooColor;
|
||||
|
||||
var dict = ret.Skip(2).Where(set.IsAvailable).GroupBy(set.Type).ToDictionary(k => k.Key, k => k.ToArray());
|
||||
foreach (var type in Enum.GetValues<CharaMakeParams.MenuType>())
|
||||
dict.TryAdd(type, Array.Empty<CustomizeIndex>());
|
||||
return dict;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
|
||||
public int Count(CustomizeIndex index)
|
||||
=> Count(index, CustomizeValue.Zero);
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ internal class CustomizeSetFactory(
|
|||
SetFacialFeatures(set, row);
|
||||
SetHairByFace(set);
|
||||
SetNpcData(set, set.Clan, set.Gender);
|
||||
SetOrder(set);
|
||||
}
|
||||
|
||||
/// <summary> Given a customize set with filled data, find all customizations used by valid NPCs that are not regularly available. </summary>
|
||||
|
|
@ -303,7 +304,7 @@ internal class CustomizeSetFactory(
|
|||
}
|
||||
|
||||
/// <summary> Get the manu types for all available options. </summary>
|
||||
private CharaMakeParams.MenuType[] GetMenuTypes(CharaMakeParams row)
|
||||
private static CharaMakeParams.MenuType[] GetMenuTypes(CharaMakeParams row)
|
||||
{
|
||||
// Set up the menu types for all customizations.
|
||||
return Enum.GetValues<CustomizeIndex>().Select(c =>
|
||||
|
|
@ -394,6 +395,19 @@ internal class CustomizeSetFactory(
|
|||
}
|
||||
}
|
||||
|
||||
internal static void SetOrder(CustomizeSet set)
|
||||
{
|
||||
var ret = Enum.GetValues<CustomizeIndex>().ToArray();
|
||||
ret[(int)CustomizeIndex.TattooColor] = CustomizeIndex.EyeColorLeft;
|
||||
ret[(int)CustomizeIndex.EyeColorLeft] = CustomizeIndex.EyeColorRight;
|
||||
ret[(int)CustomizeIndex.EyeColorRight] = CustomizeIndex.TattooColor;
|
||||
|
||||
var dict = ret.Skip(2).Where(set.IsAvailable).GroupBy(set.Type).ToDictionary(k => k.Key, k => k.ToArray());
|
||||
foreach (var type in Enum.GetValues<CharaMakeParams.MenuType>())
|
||||
dict.TryAdd(type, []);
|
||||
set.Order = dict;
|
||||
}
|
||||
|
||||
/// <summary> Set hairstyles per face for Hrothgar and make it simple for non-Hrothgar. </summary>
|
||||
private void SetHairByFace(CustomizeSet set)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue