mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-17 22:24:25 +01:00
Compare commits
No commits in common. "main" and "testing_1.5.1.4" have entirely different histories.
main
...
testing_1.
12 changed files with 38 additions and 93 deletions
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3bfd1db3a471f6e808c4d981485a08f58a4bf6cd
|
Subproject commit 59a7ab5fa9941eb754757b62e4cb189e455e9514
|
||||||
|
|
@ -100,7 +100,7 @@ public sealed class Design : DesignBase, ISavable, IDesignStandIn
|
||||||
|
|
||||||
public new JObject JsonSerialize()
|
public new JObject JsonSerialize()
|
||||||
{
|
{
|
||||||
var ret = new JObject
|
var ret = new JObject()
|
||||||
{
|
{
|
||||||
["FileVersion"] = FileVersion,
|
["FileVersion"] = FileVersion,
|
||||||
["Identifier"] = Identifier,
|
["Identifier"] = Identifier,
|
||||||
|
|
@ -131,17 +131,12 @@ public sealed class Design : DesignBase, ISavable, IDesignStandIn
|
||||||
var ret = new JArray();
|
var ret = new JArray();
|
||||||
foreach (var (mod, settings) in AssociatedMods)
|
foreach (var (mod, settings) in AssociatedMods)
|
||||||
{
|
{
|
||||||
var obj = new JObject
|
var obj = new JObject()
|
||||||
{
|
{
|
||||||
["Name"] = mod.Name,
|
["Name"] = mod.Name,
|
||||||
["Directory"] = mod.DirectoryName,
|
["Directory"] = mod.DirectoryName,
|
||||||
|
["Enabled"] = settings.Enabled,
|
||||||
};
|
};
|
||||||
if (settings.Remove)
|
|
||||||
obj["Remove"] = true;
|
|
||||||
else if (settings.ForceInherit)
|
|
||||||
obj["Inherit"] = true;
|
|
||||||
else
|
|
||||||
obj["Enabled"] = settings.Enabled;
|
|
||||||
if (settings.Enabled)
|
if (settings.Enabled)
|
||||||
{
|
{
|
||||||
obj["Priority"] = settings.Priority;
|
obj["Priority"] = settings.Priority;
|
||||||
|
|
|
||||||
|
|
@ -557,7 +557,7 @@ public sealed class DesignManager : DesignEditor
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
File.Move(SaveService.FileNames.MigrationDesignFile,
|
File.Move(SaveService.FileNames.MigrationDesignFile,
|
||||||
Path.ChangeExtension(SaveService.FileNames.MigrationDesignFile, ".json.bak"), true);
|
Path.ChangeExtension(SaveService.FileNames.MigrationDesignFile, ".json.bak"));
|
||||||
Glamourer.Log.Information($"Moved migrated design file {SaveService.FileNames.MigrationDesignFile} to backup file.");
|
Glamourer.Log.Information($"Moved migrated design file {SaveService.FileNames.MigrationDesignFile} to backup file.");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<Project Sdk="Dalamud.NET.Sdk/14.0.0">
|
<Project Sdk="Dalamud.NET.Sdk/13.1.0">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<RootNamespace>Glamourer</RootNamespace>
|
<RootNamespace>Glamourer</RootNamespace>
|
||||||
<AssemblyName>Glamourer</AssemblyName>
|
<AssemblyName>Glamourer</AssemblyName>
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,11 @@ public sealed class PenumbraChangedItemTooltip : IDisposable
|
||||||
private readonly CustomizeService _customize;
|
private readonly CustomizeService _customize;
|
||||||
private readonly GPoseService _gpose;
|
private readonly GPoseService _gpose;
|
||||||
|
|
||||||
private readonly EquipItem[] _lastItems = new EquipItem[EquipFlagExtensions.NumEquipFlags / 2 + BonusExtensions.AllFlags.Count];
|
private readonly EquipItem[] _lastItems = new EquipItem[EquipFlagExtensions.NumEquipFlags / 2];
|
||||||
|
|
||||||
public IEnumerable<KeyValuePair<object, EquipItem>> LastItems
|
public IEnumerable<KeyValuePair<EquipSlot, EquipItem>> LastItems
|
||||||
=> EquipSlotExtensions.EqdpSlots.Cast<object>().Append(EquipSlot.MainHand).Append(EquipSlot.OffHand)
|
=> EquipSlotExtensions.EqdpSlots.Append(EquipSlot.MainHand).Append(EquipSlot.OffHand).Zip(_lastItems)
|
||||||
.Concat(BonusExtensions.AllFlags.Cast<object>()).Zip(_lastItems)
|
.Select(p => new KeyValuePair<EquipSlot, EquipItem>(p.First, p.Second));
|
||||||
.Select(p => new KeyValuePair<object, EquipItem>(p.First, p.Second));
|
|
||||||
|
|
||||||
public ChangedItemType LastType { get; private set; } = ChangedItemType.None;
|
public ChangedItemType LastType { get; private set; } = ChangedItemType.None;
|
||||||
public uint LastId { get; private set; }
|
public uint LastId { get; private set; }
|
||||||
|
|
@ -73,21 +72,6 @@ public sealed class PenumbraChangedItemTooltip : IDisposable
|
||||||
if (!Player())
|
if (!Player())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var bonusSlot = item.Type.ToBonus();
|
|
||||||
if (bonusSlot is not BonusItemFlag.Unknown)
|
|
||||||
{
|
|
||||||
// + 2 due to weapons.
|
|
||||||
var glasses = _lastItems[bonusSlot.ToSlot() + 2];
|
|
||||||
using (_ = !openTooltip ? null : ImRaii.Tooltip())
|
|
||||||
{
|
|
||||||
ImGui.TextUnformatted($"{prefix}Right-Click to apply to current actor.");
|
|
||||||
if (glasses.Valid)
|
|
||||||
ImGui.TextUnformatted($"{prefix}Control + Right-Click to re-apply {glasses.Name} to current actor.");
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var slot = item.Type.ToSlot();
|
var slot = item.Type.ToSlot();
|
||||||
var last = _lastItems[slot.ToIndex()];
|
var last = _lastItems[slot.ToIndex()];
|
||||||
switch (slot)
|
switch (slot)
|
||||||
|
|
@ -125,27 +109,6 @@ public sealed class PenumbraChangedItemTooltip : IDisposable
|
||||||
|
|
||||||
public void ApplyItem(ActorState state, EquipItem item)
|
public void ApplyItem(ActorState state, EquipItem item)
|
||||||
{
|
{
|
||||||
var bonusSlot = item.Type.ToBonus();
|
|
||||||
if (bonusSlot is not BonusItemFlag.Unknown)
|
|
||||||
{
|
|
||||||
// + 2 due to weapons.
|
|
||||||
var glasses = _lastItems[bonusSlot.ToSlot() + 2];
|
|
||||||
if (ImGui.GetIO().KeyCtrl && glasses.Valid)
|
|
||||||
{
|
|
||||||
Glamourer.Log.Debug($"Re-Applying {glasses.Name} to {bonusSlot.ToName()}.");
|
|
||||||
SetLastItem(bonusSlot, default, state);
|
|
||||||
_stateManager.ChangeBonusItem(state, bonusSlot, glasses, ApplySettings.Manual);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Glamourer.Log.Debug($"Applying {item.Name} to {bonusSlot.ToName()}.");
|
|
||||||
SetLastItem(bonusSlot, item, state);
|
|
||||||
_stateManager.ChangeBonusItem(state, bonusSlot, item, ApplySettings.Manual);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var slot = item.Type.ToSlot();
|
var slot = item.Type.ToSlot();
|
||||||
var last = _lastItems[slot.ToIndex()];
|
var last = _lastItems[slot.ToIndex()];
|
||||||
switch (slot)
|
switch (slot)
|
||||||
|
|
@ -302,22 +265,7 @@ public sealed class PenumbraChangedItemTooltip : IDisposable
|
||||||
{
|
{
|
||||||
var oldItem = state.ModelData.Item(slot);
|
var oldItem = state.ModelData.Item(slot);
|
||||||
if (oldItem.Id != item.Id)
|
if (oldItem.Id != item.Id)
|
||||||
last = oldItem;
|
_lastItems[slot.ToIndex()] = oldItem;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetLastItem(BonusItemFlag slot, EquipItem item, ActorState state)
|
|
||||||
{
|
|
||||||
ref var last = ref _lastItems[slot.ToSlot() + 2];
|
|
||||||
if (!item.Valid)
|
|
||||||
{
|
|
||||||
last = default;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var oldItem = state.ModelData.BonusItem(slot);
|
|
||||||
if (oldItem.Id != item.Id)
|
|
||||||
last = oldItem;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,13 +89,7 @@ public unsafe class PenumbraPanel(PenumbraService _penumbra, PenumbraChangedItem
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
foreach (var (slot, item) in _penumbraTooltip.LastItems)
|
foreach (var (slot, item) in _penumbraTooltip.LastItems)
|
||||||
{
|
{
|
||||||
switch (slot)
|
ImGuiUtil.DrawTableColumn($"{slot.ToName()} Revert-Item");
|
||||||
{
|
|
||||||
case EquipSlot e: ImGuiUtil.DrawTableColumn($"{e.ToName()} Revert-Item"); break;
|
|
||||||
case BonusItemFlag f: ImGuiUtil.DrawTableColumn($"{f.ToName()} Revert-Item"); break;
|
|
||||||
default: ImGuiUtil.DrawTableColumn("Unk Revert-Item"); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGuiUtil.DrawTableColumn(item.Valid ? item.Name : "None");
|
ImGuiUtil.DrawTableColumn(item.Valid ? item.Name : "None");
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
{
|
{
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"net10.0-windows7.0": {
|
"net9.0-windows7.0": {
|
||||||
"DalamudPackager": {
|
"DalamudPackager": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[14.0.0, )",
|
"requested": "[13.1.0, )",
|
||||||
"resolved": "14.0.0",
|
"resolved": "13.1.0",
|
||||||
"contentHash": "9c1q/eAeAs82mkQWBOaCvbt3GIQxAIadz5b/7pCXDIy9nHPtnRc+tDXEvKR+M36Wvi7n+qBTevRupkLUQp6DFA=="
|
"contentHash": "XdoNhJGyFby5M/sdcRhnc5xTop9PHy+H50PTWpzLhJugjB19EDBiHD/AsiDF66RETM+0qKUdJBZrNuebn7qswQ=="
|
||||||
},
|
},
|
||||||
"DotNet.ReproducibleBuilds": {
|
"DotNet.ReproducibleBuilds": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[1.2.39, )",
|
"requested": "[1.2.25, )",
|
||||||
"resolved": "1.2.39",
|
"resolved": "1.2.25",
|
||||||
"contentHash": "fcFN01tDTIQqDuTwr1jUQK/geofiwjG5DycJQOnC72i1SsLAk1ELe+apBOuZ11UMQG8YKFZG1FgvjZPbqHyatg=="
|
"contentHash": "xCXiw7BCxHJ8pF6wPepRUddlh2dlQlbr81gXA72hdk4FLHkKXas7EH/n+fk5UCA/YfMqG1Z6XaPiUjDbUNBUzg=="
|
||||||
},
|
},
|
||||||
"Vortice.Direct3D11": {
|
"Vortice.Direct3D11": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
|
|
@ -32,7 +32,10 @@
|
||||||
"FlatSharp.Runtime": {
|
"FlatSharp.Runtime": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "7.9.0",
|
"resolved": "7.9.0",
|
||||||
"contentHash": "Bm8+WqzEsWNpxqrD5x4x+zQ8dyINlToCreM5FI2oNSfUVc9U9ZB+qztX/jd8rlJb3r0vBSlPwVLpw0xBtPa3Vw=="
|
"contentHash": "Bm8+WqzEsWNpxqrD5x4x+zQ8dyINlToCreM5FI2oNSfUVc9U9ZB+qztX/jd8rlJb3r0vBSlPwVLpw0xBtPa3Vw==",
|
||||||
|
"dependencies": {
|
||||||
|
"System.Memory": "4.5.5"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"JetBrains.Annotations": {
|
"JetBrains.Annotations": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
|
|
@ -65,6 +68,11 @@
|
||||||
"SharpGen.Runtime": "2.1.2-beta"
|
"SharpGen.Runtime": "2.1.2-beta"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"System.Memory": {
|
||||||
|
"type": "Transitive",
|
||||||
|
"resolved": "4.5.5",
|
||||||
|
"contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw=="
|
||||||
|
},
|
||||||
"Vortice.DirectX": {
|
"Vortice.DirectX": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "3.4.2-beta",
|
"resolved": "3.4.2-beta",
|
||||||
|
|
@ -108,7 +116,7 @@
|
||||||
"FlatSharp.Compiler": "[7.9.0, )",
|
"FlatSharp.Compiler": "[7.9.0, )",
|
||||||
"FlatSharp.Runtime": "[7.9.0, )",
|
"FlatSharp.Runtime": "[7.9.0, )",
|
||||||
"OtterGui": "[1.0.0, )",
|
"OtterGui": "[1.0.0, )",
|
||||||
"Penumbra.Api": "[5.13.0, )",
|
"Penumbra.Api": "[5.10.0, )",
|
||||||
"Penumbra.String": "[1.0.6, )"
|
"Penumbra.String": "[1.0.6, )"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
2
OtterGui
2
OtterGui
|
|
@ -1 +1 @@
|
||||||
Subproject commit 6f3236453b1edfaa25c8edcc8b39a9d9b2fc18ac
|
Subproject commit a63f6735cf4bed4f7502a022a10378607082b770
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit e4934ccca0379f22dadf989ab2d34f30b3c5c7ea
|
Subproject commit c23ee05c1e9fa103eaa52e6aa7e855ef568ee669
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 2ff50e68f7c951f0f8b25957a400a2e32ed9d6dc
|
Subproject commit d889f9ef918514a46049725052d378b441915b00
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0315144ab5614c11911e2a4dddf436fb18c5d7e3
|
Subproject commit c8611a0c546b6b2ec29214ab319fc2c38fe74793
|
||||||
10
repo.json
10
repo.json
|
|
@ -17,8 +17,8 @@
|
||||||
"Character"
|
"Character"
|
||||||
],
|
],
|
||||||
"InternalName": "Glamourer",
|
"InternalName": "Glamourer",
|
||||||
"AssemblyVersion": "1.5.1.5",
|
"AssemblyVersion": "1.5.1.3",
|
||||||
"TestingAssemblyVersion": "1.5.1.5",
|
"TestingAssemblyVersion": "1.5.1.3",
|
||||||
"RepoUrl": "https://github.com/Ottermandias/Glamourer",
|
"RepoUrl": "https://github.com/Ottermandias/Glamourer",
|
||||||
"ApplicableVersion": "any",
|
"ApplicableVersion": "any",
|
||||||
"DalamudApiLevel": 13,
|
"DalamudApiLevel": 13,
|
||||||
|
|
@ -27,9 +27,9 @@
|
||||||
"IsTestingExclusive": "False",
|
"IsTestingExclusive": "False",
|
||||||
"DownloadCount": 1,
|
"DownloadCount": 1,
|
||||||
"LastUpdate": 1618608322,
|
"LastUpdate": 1618608322,
|
||||||
"DownloadLinkInstall": "https://github.com/Ottermandias/Glamourer/releases/download/1.5.1.5/Glamourer.zip",
|
"DownloadLinkInstall": "https://github.com/Ottermandias/Glamourer/releases/download/1.5.1.3/Glamourer.zip",
|
||||||
"DownloadLinkUpdate": "https://github.com/Ottermandias/Glamourer/releases/download/1.5.1.5/Glamourer.zip",
|
"DownloadLinkUpdate": "https://github.com/Ottermandias/Glamourer/releases/download/1.5.1.3/Glamourer.zip",
|
||||||
"DownloadLinkTesting": "https://github.com/Ottermandias/Glamourer/releases/download/1.5.1.5/Glamourer.zip",
|
"DownloadLinkTesting": "https://github.com/Ottermandias/Glamourer/releases/download/1.5.1.3/Glamourer.zip",
|
||||||
"IconUrl": "https://raw.githubusercontent.com/Ottermandias/Glamourer/main/images/icon.png"
|
"IconUrl": "https://raw.githubusercontent.com/Ottermandias/Glamourer/main/images/icon.png"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue