mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 18:27:24 +01:00
Some Stuff
This commit is contained in:
parent
cc09cced61
commit
11ab85545f
2 changed files with 11 additions and 12 deletions
|
|
@ -111,16 +111,7 @@ public class DesignConverter(ItemManager _items, DesignManager _designs, Customi
|
||||||
: DesignBase.LoadDesignBase(_customize, _items, jObj2);
|
: DesignBase.LoadDesignBase(_customize, _items, jObj2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Version:
|
|
||||||
{
|
|
||||||
version = bytes.DecompressToString(out var decompressed);
|
|
||||||
var jObj2 = JObject.Parse(decompressed);
|
|
||||||
Debug.Assert(version == Version);
|
|
||||||
ret = jObj2["Identifier"] != null
|
|
||||||
? Design.LoadDesign(_customize, _items, jObj2)
|
|
||||||
: DesignBase.LoadDesignBase(_customize, _items, jObj2);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: throw new Exception($"Unknown Version {bytes[0]}.");
|
default: throw new Exception($"Unknown Version {bytes[0]}.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Dalamud.Game.ClientState.Objects.Types;
|
using Dalamud.Game.ClientState.Objects.Types;
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
|
|
@ -483,21 +484,28 @@ public unsafe class DebugTab : ITab
|
||||||
|
|
||||||
private void DrawCrests(Actor actor, Model model)
|
private void DrawCrests(Actor actor, Model model)
|
||||||
{
|
{
|
||||||
using var id = ImRaii.PushId("Crests");
|
using var id = ImRaii.PushId("Crests");
|
||||||
|
CrestFlag whichToggle = 0;
|
||||||
|
CrestFlag totalModelFlags = 0;
|
||||||
foreach (var crestFlag in CrestExtensions.AllRelevantSet)
|
foreach (var crestFlag in CrestExtensions.AllRelevantSet)
|
||||||
{
|
{
|
||||||
id.Push((int)crestFlag);
|
id.Push((int)crestFlag);
|
||||||
var modelCrest = CrestService.GetModelCrest(actor, crestFlag);
|
var modelCrest = CrestService.GetModelCrest(actor, crestFlag);
|
||||||
|
if (modelCrest)
|
||||||
|
totalModelFlags |= crestFlag;
|
||||||
ImGuiUtil.DrawTableColumn($"{crestFlag.ToLabel()} Crest");
|
ImGuiUtil.DrawTableColumn($"{crestFlag.ToLabel()} Crest");
|
||||||
ImGuiUtil.DrawTableColumn(actor.IsCharacter ? actor.GetCrest(crestFlag).ToString() : "No Character");
|
ImGuiUtil.DrawTableColumn(actor.IsCharacter ? actor.GetCrest(crestFlag).ToString() : "No Character");
|
||||||
ImGuiUtil.DrawTableColumn(modelCrest.ToString());
|
ImGuiUtil.DrawTableColumn(modelCrest.ToString());
|
||||||
|
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
if (model.IsHuman && ImGui.SmallButton("Toggle"))
|
if (model.IsHuman && ImGui.SmallButton("Toggle"))
|
||||||
_crestService.UpdateCrest(actor, crestFlag, !modelCrest);
|
whichToggle = crestFlag;
|
||||||
|
|
||||||
id.Pop();
|
id.Pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (whichToggle != 0)
|
||||||
|
_crestService.UpdateCrests(actor, totalModelFlags ^ whichToggle);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue