diff --git a/Glamourer.GameData/Customization/CharaMakeParams.cs b/Glamourer.GameData/Customization/CharaMakeParams.cs index 25f28a3..497cdb9 100644 --- a/Glamourer.GameData/Customization/CharaMakeParams.cs +++ b/Glamourer.GameData/Customization/CharaMakeParams.cs @@ -51,12 +51,12 @@ namespace Glamourer.Customization public Menu[] Menus { get; set; } = new Menu[NumMenus]; public byte[] Voices { get; set; } = new byte[NumVoices]; public FacialFeatures[] FacialFeatureByFace { get; set; } = new FacialFeatures[NumFaces]; - public CharaMakeType.UnkStruct3347Struct[] Equip { get; set; } = new CharaMakeType.UnkStruct3347Struct[NumEquip]; + public CharaMakeType.CharaMakeTypeUnkData3347Obj[] Equip { get; set; } = new CharaMakeType.CharaMakeTypeUnkData3347Obj[NumEquip]; public override void PopulateData(RowParser parser, Lumina.GameData gameData, Language language) { - RowId = parser.Row; - SubRowId = parser.SubRow; + RowId = parser.RowId; + SubRowId = parser.SubRowId; Race = new LazyRow(gameData, parser.ReadColumn(0), language); Tribe = new LazyRow(gameData, parser.ReadColumn(1), language); Gender = parser.ReadColumn(2); @@ -101,7 +101,7 @@ namespace Glamourer.Customization for (var i = 0; i < NumEquip; ++i) { - Equip[i] = new CharaMakeType.UnkStruct3347Struct + Equip[i] = new CharaMakeType.CharaMakeTypeUnkData3347Obj() { Helmet = parser.ReadColumn( 3 + (MaxNumValues + 7 + NumGraphics) * NumMenus + NumVoices + NumFaces * NumFeatures + i * 7 + 0), diff --git a/Glamourer.GameData/Customization/CharacterCustomization.cs b/Glamourer.GameData/Customization/CharacterCustomization.cs index 4376b35..1cd8ae6 100644 --- a/Glamourer.GameData/Customization/CharacterCustomization.cs +++ b/Glamourer.GameData/Customization/CharacterCustomization.cs @@ -23,7 +23,7 @@ namespace Glamourer.Customization [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct CharacterCustomization { - public const int CustomizationOffset = 0x1898; + public const int CustomizationOffset = 0xDD8; public const int CustomizationBytes = 26; public static CharacterCustomization Default = new() diff --git a/Glamourer.GameData/Customization/CustomizationSet.cs b/Glamourer.GameData/Customization/CustomizationSet.cs index 8e6017d..e778aad 100644 --- a/Glamourer.GameData/Customization/CustomizationSet.cs +++ b/Glamourer.GameData/Customization/CustomizationSet.cs @@ -3,191 +3,188 @@ using System.Collections.Generic; using System.Linq; using Penumbra.GameData.Enums; -namespace Glamourer.Customization +namespace Glamourer.Customization; + +public class CustomizationSet { - public class CustomizationSet + public const int DefaultAvailable = + (1 << (int)CustomizationId.Height) + | (1 << (int)CustomizationId.Hairstyle) + | (1 << (int)CustomizationId.SkinColor) + | (1 << (int)CustomizationId.EyeColorR) + | (1 << (int)CustomizationId.EyeColorL) + | (1 << (int)CustomizationId.HairColor) + | (1 << (int)CustomizationId.HighlightColor) + | (1 << (int)CustomizationId.FacialFeaturesTattoos) + | (1 << (int)CustomizationId.TattooColor) + | (1 << (int)CustomizationId.LipColor) + | (1 << (int)CustomizationId.Height); + + internal CustomizationSet(SubRace clan, Gender gender) { - public const int DefaultAvailable = - (1 << (int) CustomizationId.Height) - | (1 << (int) CustomizationId.Hairstyle) - | (1 << (int) CustomizationId.SkinColor) - | (1 << (int) CustomizationId.EyeColorR) - | (1 << (int) CustomizationId.EyeColorL) - | (1 << (int) CustomizationId.HairColor) - | (1 << (int) CustomizationId.HighlightColor) - | (1 << (int) CustomizationId.FacialFeaturesTattoos) - | (1 << (int) CustomizationId.TattooColor) - | (1 << (int) CustomizationId.LipColor) - | (1 << (int) CustomizationId.Height); + Gender = gender; + Clan = clan; + _settingAvailable = clan.ToRace() == Race.Hrothgar && gender == Gender.Female + ? 0 + : DefaultAvailable; + } - internal CustomizationSet(SubRace clan, Gender gender) + public Gender Gender { get; } + public SubRace Clan { get; } + + public Race Race + => Clan.ToRace(); + + private int _settingAvailable; + + internal void SetAvailable(CustomizationId id) + => _settingAvailable |= 1 << (int)id; + + public bool IsAvailable(CustomizationId id) + => (_settingAvailable & (1 << (int)id)) != 0; + + public int NumEyebrows { get; internal set; } + public int NumEyeShapes { get; internal set; } + public int NumNoseShapes { get; internal set; } + public int NumJawShapes { get; internal set; } + public int NumMouthShapes { get; internal set; } + + + public IReadOnlyList OptionName { get; internal set; } = null!; + public IReadOnlyList Faces { get; internal set; } = null!; + public IReadOnlyList HairStyles { get; internal set; } = null!; + public IReadOnlyList TailEarShapes { get; internal set; } = null!; + public IReadOnlyList> FeaturesTattoos { get; internal set; } = null!; + public IReadOnlyList FacePaints { get; internal set; } = null!; + + public IReadOnlyList SkinColors { get; internal set; } = null!; + public IReadOnlyList HairColors { get; internal set; } = null!; + public IReadOnlyList HighlightColors { get; internal set; } = null!; + public IReadOnlyList EyeColors { get; internal set; } = null!; + public IReadOnlyList TattooColors { get; internal set; } = null!; + public IReadOnlyList FacePaintColorsLight { get; internal set; } = null!; + public IReadOnlyList FacePaintColorsDark { get; internal set; } = null!; + public IReadOnlyList LipColorsLight { get; internal set; } = null!; + public IReadOnlyList LipColorsDark { get; internal set; } = null!; + + public IReadOnlyList Types { get; internal set; } = null!; + + public string Option(CustomizationId id) + => OptionName[(int)id]; + + public Customization FacialFeature(int faceIdx, int idx) + => FeaturesTattoos[faceIdx - 1][idx]; + + public int DataByValue(CustomizationId id, byte value, out Customization? custom) + { + var type = id.ToType(); + custom = null; + if (type == CharaMakeParams.MenuType.Percentage || type == CharaMakeParams.MenuType.ListSelector) { - Gender = gender; - Clan = clan; - _settingAvailable = - clan.ToRace() == Race.Viera && gender == Gender.Male - || clan.ToRace() == Race.Hrothgar && gender == Gender.Female - ? 0 - : DefaultAvailable; + if (value < Count(id)) + { + custom = new Customization(id, value, 0, value); + return value; + } + + return -1; } - public Gender Gender { get; } - public SubRace Clan { get; } - - public Race Race - => Clan.ToRace(); - - private int _settingAvailable; - - internal void SetAvailable(CustomizationId id) - => _settingAvailable |= 1 << (int) id; - - public bool IsAvailable(CustomizationId id) - => (_settingAvailable & (1 << (int) id)) != 0; - - public int NumEyebrows { get; internal set; } - public int NumEyeShapes { get; internal set; } - public int NumNoseShapes { get; internal set; } - public int NumJawShapes { get; internal set; } - public int NumMouthShapes { get; internal set; } - - - public IReadOnlyList OptionName { get; internal set; } = null!; - public IReadOnlyList Faces { get; internal set; } = null!; - public IReadOnlyList HairStyles { get; internal set; } = null!; - public IReadOnlyList TailEarShapes { get; internal set; } = null!; - public IReadOnlyList> FeaturesTattoos { get; internal set; } = null!; - public IReadOnlyList FacePaints { get; internal set; } = null!; - - public IReadOnlyList SkinColors { get; internal set; } = null!; - public IReadOnlyList HairColors { get; internal set; } = null!; - public IReadOnlyList HighlightColors { get; internal set; } = null!; - public IReadOnlyList EyeColors { get; internal set; } = null!; - public IReadOnlyList TattooColors { get; internal set; } = null!; - public IReadOnlyList FacePaintColorsLight { get; internal set; } = null!; - public IReadOnlyList FacePaintColorsDark { get; internal set; } = null!; - public IReadOnlyList LipColorsLight { get; internal set; } = null!; - public IReadOnlyList LipColorsDark { get; internal set; } = null!; - - public IReadOnlyList Types { get; internal set; } = null!; - - public string Option(CustomizationId id) - => OptionName[(int) id]; - - public Customization FacialFeature(int faceIdx, int idx) - => FeaturesTattoos[faceIdx - 1][idx]; - - public int DataByValue(CustomizationId id, byte value, out Customization? custom) + int Get(IEnumerable list, ref Customization? output) { - var type = id.ToType(); - custom = null; - if (type == CharaMakeParams.MenuType.Percentage || type == CharaMakeParams.MenuType.ListSelector) - { - if (value < Count(id)) - { - custom = new Customization(id, value, 0, value); - return value; - } - + var (val, idx) = list.Cast().Select((c, i) => (c, i)).FirstOrDefault(c => c.c!.Value.Value == value); + if (val == null) return -1; - } - int Get(IEnumerable list, ref Customization? output) - { - var (val, idx) = list.Cast().Select((c, i) => (c, i)).FirstOrDefault(c => c.c!.Value.Value == value); - if (val == null) - return -1; - - output = val; - return idx; - } - - return id switch - { - CustomizationId.SkinColor => Get(SkinColors, ref custom), - CustomizationId.EyeColorL => Get(EyeColors, ref custom), - CustomizationId.EyeColorR => Get(EyeColors, ref custom), - CustomizationId.HairColor => Get(HairColors, ref custom), - CustomizationId.HighlightColor => Get(HighlightColors, ref custom), - CustomizationId.TattooColor => Get(TattooColors, ref custom), - CustomizationId.LipColor => Get(LipColorsDark.Concat(LipColorsLight), ref custom), - CustomizationId.FacePaintColor => Get(FacePaintColorsDark.Concat(FacePaintColorsLight), ref custom), - - CustomizationId.Face => Get(Faces, ref custom), - CustomizationId.Hairstyle => Get(HairStyles, ref custom), - CustomizationId.TailEarShape => Get(TailEarShapes, ref custom), - CustomizationId.FacePaint => Get(FacePaints, ref custom), - CustomizationId.FacialFeaturesTattoos => Get(FeaturesTattoos[0], ref custom), - _ => throw new ArgumentOutOfRangeException(nameof(id), id, null), - }; + output = val; + return idx; } - public Customization Data(CustomizationId id, int idx) + return id switch { - if (idx > Count(id)) - throw new IndexOutOfRangeException(); + CustomizationId.SkinColor => Get(SkinColors, ref custom), + CustomizationId.EyeColorL => Get(EyeColors, ref custom), + CustomizationId.EyeColorR => Get(EyeColors, ref custom), + CustomizationId.HairColor => Get(HairColors, ref custom), + CustomizationId.HighlightColor => Get(HighlightColors, ref custom), + CustomizationId.TattooColor => Get(TattooColors, ref custom), + CustomizationId.LipColor => Get(LipColorsDark.Concat(LipColorsLight), ref custom), + CustomizationId.FacePaintColor => Get(FacePaintColorsDark.Concat(FacePaintColorsLight), ref custom), - switch (id.ToType()) - { - case CharaMakeParams.MenuType.Percentage: return new Customization(id, (byte) idx, 0, (ushort) idx); - case CharaMakeParams.MenuType.ListSelector: return new Customization(id, (byte) idx, 0, (ushort) idx); - } + CustomizationId.Face => Get(Faces, ref custom), + CustomizationId.Hairstyle => Get(HairStyles, ref custom), + CustomizationId.TailEarShape => Get(TailEarShapes, ref custom), + CustomizationId.FacePaint => Get(FacePaints, ref custom), + CustomizationId.FacialFeaturesTattoos => Get(FeaturesTattoos[0], ref custom), + _ => throw new ArgumentOutOfRangeException(nameof(id), id, null), + }; + } - return id switch - { - CustomizationId.Face => Faces[idx], - CustomizationId.Hairstyle => HairStyles[idx], - CustomizationId.TailEarShape => TailEarShapes[idx], - CustomizationId.FacePaint => FacePaints[idx], - CustomizationId.FacialFeaturesTattoos => FeaturesTattoos[0][idx], + public Customization Data(CustomizationId id, int idx) + { + if (idx > Count(id)) + throw new IndexOutOfRangeException(); - CustomizationId.SkinColor => SkinColors[idx], - CustomizationId.EyeColorL => EyeColors[idx], - CustomizationId.EyeColorR => EyeColors[idx], - CustomizationId.HairColor => HairColors[idx], - CustomizationId.HighlightColor => HighlightColors[idx], - CustomizationId.TattooColor => TattooColors[idx], - CustomizationId.LipColor => idx < 96 ? LipColorsDark[idx] : LipColorsLight[idx - 96], - CustomizationId.FacePaintColor => idx < 96 ? FacePaintColorsDark[idx] : FacePaintColorsLight[idx - 96], - _ => new Customization(0, 0), - }; - } - - public CharaMakeParams.MenuType Type(CustomizationId id) - => Types[(int) id]; - - - public int Count(CustomizationId id) + switch (id.ToType()) { - if (!IsAvailable(id)) - return 0; - - if (id.ToType() == CharaMakeParams.MenuType.Percentage) - return 101; - - return id switch - { - CustomizationId.Face => Faces.Count, - CustomizationId.Hairstyle => HairStyles.Count, - CustomizationId.HighlightsOnFlag => 2, - CustomizationId.SkinColor => SkinColors.Count, - CustomizationId.EyeColorR => EyeColors.Count, - CustomizationId.HairColor => HairColors.Count, - CustomizationId.HighlightColor => HighlightColors.Count, - CustomizationId.FacialFeaturesTattoos => 8, - CustomizationId.TattooColor => TattooColors.Count, - CustomizationId.Eyebrows => NumEyebrows, - CustomizationId.EyeColorL => EyeColors.Count, - CustomizationId.EyeShape => NumEyeShapes, - CustomizationId.Nose => NumNoseShapes, - CustomizationId.Jaw => NumJawShapes, - CustomizationId.Mouth => NumMouthShapes, - CustomizationId.LipColor => LipColorsLight.Count + LipColorsDark.Count, - CustomizationId.TailEarShape => TailEarShapes.Count, - CustomizationId.FacePaint => FacePaints.Count, - CustomizationId.FacePaintColor => FacePaintColorsLight.Count + FacePaintColorsDark.Count, - _ => throw new ArgumentOutOfRangeException(nameof(id), id, null), - }; + case CharaMakeParams.MenuType.Percentage: return new Customization(id, (byte)idx, 0, (ushort)idx); + case CharaMakeParams.MenuType.ListSelector: return new Customization(id, (byte)idx, 0, (ushort)idx); } + + return id switch + { + CustomizationId.Face => Faces[idx], + CustomizationId.Hairstyle => HairStyles[idx], + CustomizationId.TailEarShape => TailEarShapes[idx], + CustomizationId.FacePaint => FacePaints[idx], + CustomizationId.FacialFeaturesTattoos => FeaturesTattoos[0][idx], + + CustomizationId.SkinColor => SkinColors[idx], + CustomizationId.EyeColorL => EyeColors[idx], + CustomizationId.EyeColorR => EyeColors[idx], + CustomizationId.HairColor => HairColors[idx], + CustomizationId.HighlightColor => HighlightColors[idx], + CustomizationId.TattooColor => TattooColors[idx], + CustomizationId.LipColor => idx < 96 ? LipColorsDark[idx] : LipColorsLight[idx - 96], + CustomizationId.FacePaintColor => idx < 96 ? FacePaintColorsDark[idx] : FacePaintColorsLight[idx - 96], + _ => new Customization(0, 0), + }; + } + + public CharaMakeParams.MenuType Type(CustomizationId id) + => Types[(int)id]; + + + public int Count(CustomizationId id) + { + if (!IsAvailable(id)) + return 0; + + if (id.ToType() == CharaMakeParams.MenuType.Percentage) + return 101; + + return id switch + { + CustomizationId.Face => Faces.Count, + CustomizationId.Hairstyle => HairStyles.Count, + CustomizationId.HighlightsOnFlag => 2, + CustomizationId.SkinColor => SkinColors.Count, + CustomizationId.EyeColorR => EyeColors.Count, + CustomizationId.HairColor => HairColors.Count, + CustomizationId.HighlightColor => HighlightColors.Count, + CustomizationId.FacialFeaturesTattoos => 8, + CustomizationId.TattooColor => TattooColors.Count, + CustomizationId.Eyebrows => NumEyebrows, + CustomizationId.EyeColorL => EyeColors.Count, + CustomizationId.EyeShape => NumEyeShapes, + CustomizationId.Nose => NumNoseShapes, + CustomizationId.Jaw => NumJawShapes, + CustomizationId.Mouth => NumMouthShapes, + CustomizationId.LipColor => LipColorsLight.Count + LipColorsDark.Count, + CustomizationId.TailEarShape => TailEarShapes.Count, + CustomizationId.FacePaint => FacePaints.Count, + CustomizationId.FacePaintColor => FacePaintColorsLight.Count + FacePaintColorsDark.Count, + _ => throw new ArgumentOutOfRangeException(nameof(id), id, null), + }; } } diff --git a/Glamourer.zip b/Glamourer.zip index 08d95ec..d84a085 100644 Binary files a/Glamourer.zip and b/Glamourer.zip differ diff --git a/Glamourer/CharacterExtensions.cs b/Glamourer/CharacterExtensions.cs index a0f21e5..0dd87dd 100644 --- a/Glamourer/CharacterExtensions.cs +++ b/Glamourer/CharacterExtensions.cs @@ -1,79 +1,78 @@ using Dalamud.Game.ClientState.Objects.Types; -namespace Glamourer +namespace Glamourer; + +public static class CharacterExtensions { - public static class CharacterExtensions + public const int WetnessOffset = 0x19E4; + public const byte WetnessFlag = 0x08; + public const int StateFlagsOffset = 0xDF6; + public const byte HatHiddenFlag = 0x01; + public const byte VisorToggledFlag = 0x10; + public const int AlphaOffset = 0x18B8; + public const int WeaponHiddenOffset = 0xCD4; + public const byte WeaponHiddenFlag = 0x02; + + public static unsafe bool IsWet(this Character a) + => (*((byte*)a.Address + WetnessOffset) & WetnessFlag) != 0; + + public static unsafe bool SetWetness(this Character a, bool value) { - public const int WetnessOffset = 0x19A5; - public const byte WetnessFlag = 0x10; - public const int StateFlagsOffset = 0x106C; - public const byte HatHiddenFlag = 0x01; - public const byte VisorToggledFlag = 0x10; - public const int AlphaOffset = 0x182C; - public const int WeaponHiddenOffset = 0xF64; - public const byte WeaponHiddenFlag = 0x02; + var current = a.IsWet(); + if (current == value) + return false; - public static unsafe bool IsWet(this Character a) - => (*((byte*) a.Address + WetnessOffset) & WetnessFlag) != 0; - - public static unsafe bool SetWetness(this Character a, bool value) - { - var current = a.IsWet(); - if (current == value) - return false; - - if (value) - *((byte*) a.Address + WetnessOffset) = (byte) (*((byte*) a.Address + WetnessOffset) | WetnessFlag); - else - *((byte*) a.Address + WetnessOffset) = (byte) (*((byte*) a.Address + WetnessOffset) & ~WetnessFlag); - return true; - } - - public static unsafe ref byte StateFlags(this Character a) - => ref *((byte*) a.Address + StateFlagsOffset); - - public static bool SetStateFlag(this Character a, bool value, byte flag) - { - var current = a.StateFlags(); - var previousValue = (current & flag) != 0; - if (previousValue == value) - return false; - - if (value) - a.StateFlags() = (byte) (current | flag); - else - a.StateFlags() = (byte) (current & ~flag); - return true; - } - - public static bool IsHatHidden(this Character a) - => (a.StateFlags() & HatHiddenFlag) != 0; - - public static unsafe bool IsWeaponHidden(this Character a) - => (a.StateFlags() & WeaponHiddenFlag) != 0 - && (*((byte*) a.Address + WeaponHiddenOffset) & WeaponHiddenFlag) != 0; - - public static bool IsVisorToggled(this Character a) - => (a.StateFlags() & VisorToggledFlag) != 0; - - public static bool SetHatHidden(this Character a, bool value) - => SetStateFlag(a, value, HatHiddenFlag); - - public static unsafe bool SetWeaponHidden(this Character a, bool value) - { - var ret = SetStateFlag(a, value, WeaponHiddenFlag); - var val = *((byte*) a.Address + WeaponHiddenOffset); - if (value) - *((byte*) a.Address + WeaponHiddenOffset) = (byte) (val | WeaponHiddenFlag); - else - *((byte*) a.Address + WeaponHiddenOffset) = (byte) (val & ~WeaponHiddenFlag); - return ret || (val & WeaponHiddenFlag) != 0 != value; - } - - public static bool SetVisorToggled(this Character a, bool value) - => SetStateFlag(a, value, VisorToggledFlag); - - public static unsafe ref float Alpha(this Character a) - => ref *(float*) ((byte*) a.Address + AlphaOffset); + if (value) + *((byte*)a.Address + WetnessOffset) = (byte)(*((byte*)a.Address + WetnessOffset) | WetnessFlag); + else + *((byte*)a.Address + WetnessOffset) = (byte)(*((byte*)a.Address + WetnessOffset) & ~WetnessFlag); + return true; } + + public static unsafe ref byte StateFlags(this Character a) + => ref *((byte*)a.Address + StateFlagsOffset); + + public static bool SetStateFlag(this Character a, bool value, byte flag) + { + var current = a.StateFlags(); + var previousValue = (current & flag) != 0; + if (previousValue == value) + return false; + + if (value) + a.StateFlags() = (byte)(current | flag); + else + a.StateFlags() = (byte)(current & ~flag); + return true; + } + + public static bool IsHatHidden(this Character a) + => (a.StateFlags() & HatHiddenFlag) != 0; + + public static unsafe bool IsWeaponHidden(this Character a) + => (a.StateFlags() & WeaponHiddenFlag) != 0 + && (*((byte*)a.Address + WeaponHiddenOffset) & WeaponHiddenFlag) != 0; + + public static bool IsVisorToggled(this Character a) + => (a.StateFlags() & VisorToggledFlag) != 0; + + public static bool SetHatHidden(this Character a, bool value) + => SetStateFlag(a, value, HatHiddenFlag); + + public static unsafe bool SetWeaponHidden(this Character a, bool value) + { + var ret = SetStateFlag(a, value, WeaponHiddenFlag); + var val = *((byte*)a.Address + WeaponHiddenOffset); + if (value) + *((byte*)a.Address + WeaponHiddenOffset) = (byte)(val | WeaponHiddenFlag); + else + *((byte*)a.Address + WeaponHiddenOffset) = (byte)(val & ~WeaponHiddenFlag); + return ret || (val & WeaponHiddenFlag) != 0 != value; + } + + public static bool SetVisorToggled(this Character a, bool value) + => SetStateFlag(a, value, VisorToggledFlag); + + public static unsafe ref float Alpha(this Character a) + => ref *(float*)((byte*)a.Address + AlphaOffset); } diff --git a/Glamourer/Glamourer.csproj b/Glamourer/Glamourer.csproj index 8dc2880..8450eab 100644 --- a/Glamourer/Glamourer.csproj +++ b/Glamourer/Glamourer.csproj @@ -5,8 +5,8 @@ x64 Glamourer Glamourer - 0.0.6.2 - 0.0.6.2 + 0.0.7.0 + 0.0.7.0 SoftOtter Glamourer Copyright © 2020 diff --git a/Glamourer/Glamourer.json b/Glamourer/Glamourer.json index dd742a6..fdcad82 100644 --- a/Glamourer/Glamourer.json +++ b/Glamourer/Glamourer.json @@ -5,10 +5,10 @@ "Description": "Adds functionality to change and store appearance of players, customization and equip. Requires Penumbra to be installed and activated to work. Can also add preview options to the Changed Items tab for Penumbra.", "Tags": [ "Appearance", "Glamour", "Race", "Outfit", "Armor", "Clothes", "Skins", "Customization", "Design", "Character" ], "InternalName": "Glamourer", - "AssemblyVersion": "0.0.6.2", + "AssemblyVersion": "0.0.7.0", "RepoUrl": "https://github.com/Ottermandias/Glamourer", "ApplicableVersion": "any", - "DalamudApiLevel": 4, + "DalamudApiLevel": 5, "LoadPriority": -100, "ImageUrls": null, "IconUrl": "https://raw.githubusercontent.com/Ottermandias/Glamourer/master/images/icon.png" diff --git a/Glamourer/Gui/InterfaceCustomization.cs b/Glamourer/Gui/InterfaceCustomization.cs index bc7239e..b5f12b0 100644 --- a/Glamourer/Gui/InterfaceCustomization.cs +++ b/Glamourer/Gui/InterfaceCustomization.cs @@ -352,13 +352,7 @@ namespace Glamourer.Gui ImGui.PushFont(UiBuilder.IconFont); var icon = customization.Gender == Gender.Male ? FontAwesomeIcon.Mars : FontAwesomeIcon.Venus; var restricted = false; - if (customization.Race == Race.Viera) - { - ImGui.PushStyleVar(ImGuiStyleVar.Alpha, 0.25f); - icon = FontAwesomeIcon.VenusDouble; - restricted = true; - } - else if (customization.Race == Race.Hrothgar) + if (customization.Race == Race.Hrothgar) { ImGui.PushStyleVar(ImGuiStyleVar.Alpha, 0.25f); icon = FontAwesomeIcon.MarsDouble; diff --git a/Glamourer/Gui/InterfaceHelpers.cs b/Glamourer/Gui/InterfaceHelpers.cs index 0db19a1..1a0e8cd 100644 --- a/Glamourer/Gui/InterfaceHelpers.cs +++ b/Glamourer/Gui/InterfaceHelpers.cs @@ -63,12 +63,8 @@ namespace Glamourer.Gui customization.Race = race; customization.Clan = clan; - customization.Gender = race switch - { - Race.Hrothgar => Gender.Male, - Race.Viera => Gender.Female, - _ => customization.Gender, - }; + if (race == Race.Hrothgar) + customization.Gender = Gender.Male; FixUpAttributes(ref customization); diff --git a/repo.json b/repo.json index e75036e..6874876 100644 --- a/repo.json +++ b/repo.json @@ -6,11 +6,11 @@ "Description": "Adds functionality to change and store appearance of players, customization and equip. Requires Penumbra to be installed and activated to work. Can also add preview options to the Changed Items tab for Penumbra.", "Tags": [ "Appearance", "Glamour", "Race", "Outfit", "Armor", "Clothes", "Skins", "Customization", "Design", "Character" ], "InternalName": "Glamourer", - "AssemblyVersion": "0.0.6.2", - "TestingAssemblyVersion": "0.0.6.2", + "AssemblyVersion": "0.0.7.0", + "TestingAssemblyVersion": "0.0.7.0", "RepoUrl": "https://github.com/Ottermandias/Glamourer", "ApplicableVersion": "any", - "DalamudApiLevel": 4, + "DalamudApiLevel": 5, "IsHide": "False", "IsTestingExclusive": "false", "DownloadCount": 1,