So. Much. Stuff. Glamourer now works with all player actors, can change all customization, gear and stains. Also has a cool Legacy Tattoo icon.

This commit is contained in:
Ottermandias 2021-08-05 23:49:15 +02:00
parent fbb41636df
commit 052a2e7719
14 changed files with 1120 additions and 577 deletions

View file

@ -0,0 +1,68 @@
using System;
namespace Glamourer
{
[Flags]
public enum CharacterFlag : ulong
{
MainHand = 1ul << 0,
OffHand = 1ul << 1,
Head = 1ul << 2,
Body = 1ul << 3,
Hands = 1ul << 4,
Legs = 1ul << 5,
Feet = 1ul << 6,
Ears = 1ul << 7,
Neck = 1ul << 8,
Wrists = 1ul << 9,
RFinger = 1ul << 10,
LFinger = 1ul << 11,
ModelMask = (1ul << 12) - 1,
StainMainHand = MainHand << 16,
StainOffHand = OffHand << 16,
StainHead = Head << 16,
StainBody = Body << 16,
StainHands = Hands << 16,
StainLegs = Legs << 16,
StainFeet = Feet << 16,
StainEars = Ears << 16,
StainNeck = Neck << 16,
StainWrists = Wrists << 16,
StainRFinger = RFinger << 16,
StainLFinger = LFinger << 16,
StainMask = ModelMask << 16,
EquipMask = ModelMask | StainMask,
Race = 1ul << 32,
Gender = 1ul << 33,
BodyType = 1ul << 34,
Height = 1ul << 35,
Clan = 1ul << 36,
Face = 1ul << 37,
Hairstyle = 1ul << 38,
Highlights = 1ul << 39,
SkinColor = 1ul << 40,
EyeColorRight = 1ul << 41,
HairColor = 1ul << 42,
HighlightsColor = 1ul << 43,
FacialFeatures = 1ul << 44,
TattooColor = 1ul << 45,
Eyebrows = 1ul << 46,
EyeColorLeft = 1ul << 47,
EyeShape = 1ul << 48,
IrisSize = 1ul << 49,
NoseShape = 1ul << 50,
JawShape = 1ul << 51,
MouthShape = 1ul << 52,
Lipstick = 1ul << 53,
LipColor = 1ul << 54,
MuscleMass = 1ul << 55,
TailShape = 1ul << 56,
BustSize = 1ul << 57,
FacePaint = 1ul << 58,
FacePaintReversed = 1ul << 59,
FacePaintColor = 1ul << 60,
CustomizeMask = ((1ul << 61) - 1) & ~EquipMask,
}
}

View file

@ -35,6 +35,14 @@
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
</PropertyGroup>
<ItemGroup>
<None Remove="LegacyTattoo.raw" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="LegacyTattoo.raw" />
</ItemGroup>
<ItemGroup>
<Reference Include="Dalamud">
<HintPath>$(appdata)\XIVLauncher\addon\Hooks\dev\Dalamud.dll</HintPath>

View file

@ -15,7 +15,7 @@ namespace Glamourer.Gui
private string _currentFilterLower = string.Empty;
private bool _focus;
private readonly float _size;
private readonly float _previewSize;
private float _previewSize;
private readonly IReadOnlyList<T> _items;
private readonly IReadOnlyList<string> _itemNamesLower;
private readonly Func<T, string> _itemToName;
@ -130,8 +130,11 @@ namespace Glamourer.Gui
return ret;
}
public bool Draw(string currentName, out T? value)
public bool Draw(string currentName, out T? value, float? size = null)
{
if (size.HasValue)
_previewSize = size.Value;
value = default;
ImGui.SetNextItemWidth(_previewSize);
PrePreview?.Invoke();

File diff suppressed because it is too large Load diff

BIN
Glamourer/LegacyTattoo.raw Normal file

Binary file not shown.

View file

@ -1,16 +1,28 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.CompilerServices;
using Dalamud.Game.Command;
using Dalamud.Plugin;
using Glamourer.Customization;
using Glamourer.Gui;
using ImGuiNET;
using Penumbra.Api;
using Penumbra.GameData.Structs;
using CommandManager = Glamourer.Managers.CommandManager;
namespace Glamourer
{
public class CharacterSave
{
public string Name { get; set; } = string.Empty;
public ActorCustomization Customizations { get; private set; }
public ActorEquipment Equipment { get; private set; } = null!;
public ActorEquipMask WriteEquipment { get; set; } = ActorEquipMask.None;
public bool WriteCustomizations { get; set; } = false;
}
internal class Glamourer
{
private readonly DalamudPluginInterface _pluginInterface;