mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 10:17:23 +01:00
Fix facewear advanced dyes, fix backup service not running in task, update libraries.
This commit is contained in:
parent
0a9693daea
commit
c3469a1687
11 changed files with 34 additions and 19 deletions
|
|
@ -1 +1 @@
|
||||||
Subproject commit 54c1944dc7db704733b4788520e494761bb0b58e
|
Subproject commit 7e8505cd6f8dbc5bcf41b72e16785d62b4d218f3
|
||||||
|
|
@ -8,7 +8,6 @@ using Glamourer.Interop.Penumbra;
|
||||||
using Glamourer.Services;
|
using Glamourer.Services;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using OtterGui.Extensions;
|
|
||||||
using Penumbra.GameData.DataContainers;
|
using Penumbra.GameData.DataContainers;
|
||||||
using Penumbra.GameData.Enums;
|
using Penumbra.GameData.Enums;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<Project Sdk="Dalamud.NET.Sdk/13.0.0">
|
<Project Sdk="Dalamud.NET.Sdk/13.1.0">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<RootNamespace>Glamourer</RootNamespace>
|
<RootNamespace>Glamourer</RootNamespace>
|
||||||
<AssemblyName>Glamourer</AssemblyName>
|
<AssemblyName>Glamourer</AssemblyName>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ using Dalamud.Interface.Utility;
|
||||||
using Glamourer.Designs;
|
using Glamourer.Designs;
|
||||||
using Glamourer.Interop.Material;
|
using Glamourer.Interop.Material;
|
||||||
using Dalamud.Bindings.ImGui;
|
using Dalamud.Bindings.ImGui;
|
||||||
using OtterGui.Extensions;
|
|
||||||
using OtterGui.Raii;
|
using OtterGui.Raii;
|
||||||
using OtterGui.Text;
|
using OtterGui.Text;
|
||||||
using static Glamourer.Gui.Tabs.HeaderDrawer;
|
using static Glamourer.Gui.Tabs.HeaderDrawer;
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ public sealed unsafe class MaterialManager : IRequiredService, IDisposable
|
||||||
|
|
||||||
var drawData = type switch
|
var drawData = type switch
|
||||||
{
|
{
|
||||||
MaterialValueIndex.DrawObjectType.Human => GetTempSlot((Human*)characterBase, slotId),
|
MaterialValueIndex.DrawObjectType.Human => GetTempSlot((Human*)characterBase, (HumanSlot)slotId),
|
||||||
_ => GetTempSlot((Weapon*)characterBase),
|
_ => GetTempSlot((Weapon*)characterBase),
|
||||||
};
|
};
|
||||||
var mode = PrepareColorSet.GetMode(material);
|
var mode = PrepareColorSet.GetMode(material);
|
||||||
|
|
@ -192,13 +192,24 @@ public sealed unsafe class MaterialManager : IRequiredService, IDisposable
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> We need to get the temporary set, variant and stain that is currently being set if it is available. </summary>
|
/// <summary> We need to get the temporary set, variant and stain that is currently being set if it is available. </summary>
|
||||||
private static CharacterWeapon GetTempSlot(Human* human, byte slotId)
|
private static CharacterWeapon GetTempSlot(Human* human, HumanSlot slotId)
|
||||||
{
|
{
|
||||||
if (human->ChangedEquipData == null)
|
if (human->ChangedEquipData is null)
|
||||||
return ((Model)human).GetArmor(((uint)slotId).ToEquipSlot()).ToWeapon(0);
|
return slotId.ToSpecificEnum() switch
|
||||||
|
{
|
||||||
|
EquipSlot slot => ((Model)human).GetArmor(slot).ToWeapon(0),
|
||||||
|
BonusItemFlag bonus => ((Model)human).GetBonus(bonus).ToWeapon(0),
|
||||||
|
_ => default,
|
||||||
|
};
|
||||||
|
|
||||||
var item = (ChangedEquipData*)human->ChangedEquipData + slotId;
|
if (!slotId.ToSlotIndex(out var index))
|
||||||
|
return default;
|
||||||
|
|
||||||
|
var item = (ChangedEquipData*)human->ChangedEquipData + index;
|
||||||
|
if (index < 10)
|
||||||
return ((CharacterArmor*)item)->ToWeapon(0);
|
return ((CharacterArmor*)item)->ToWeapon(0);
|
||||||
|
|
||||||
|
return new CharacterWeapon(item->BonusModel, 0, item->BonusVariant, StainIds.None);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
using OtterGui.Classes;
|
using OtterGui.Classes;
|
||||||
using OtterGui.Log;
|
using OtterGui.Log;
|
||||||
|
using OtterGui.Services;
|
||||||
|
|
||||||
namespace Glamourer.Services;
|
namespace Glamourer.Services;
|
||||||
|
|
||||||
public class BackupService
|
public class BackupService : IAsyncService
|
||||||
{
|
{
|
||||||
private readonly Logger _logger;
|
private readonly Logger _logger;
|
||||||
private readonly DirectoryInfo _configDirectory;
|
private readonly DirectoryInfo _configDirectory;
|
||||||
|
|
@ -14,7 +15,7 @@ public class BackupService
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_fileNames = GlamourerFiles(fileNames);
|
_fileNames = GlamourerFiles(fileNames);
|
||||||
_configDirectory = new DirectoryInfo(fileNames.ConfigDirectory);
|
_configDirectory = new DirectoryInfo(fileNames.ConfigDirectory);
|
||||||
Backup.CreateAutomaticBackup(logger, _configDirectory, _fileNames);
|
Awaiter = Task.Run(() => Backup.CreateAutomaticBackup(logger, new DirectoryInfo(fileNames.ConfigDirectory), _fileNames));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> Create a permanent backup with a given name for migrations. </summary>
|
/// <summary> Create a permanent backup with a given name for migrations. </summary>
|
||||||
|
|
@ -40,4 +41,9 @@ public class BackupService
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Task Awaiter { get; }
|
||||||
|
|
||||||
|
public bool Finished
|
||||||
|
=> Awaiter.IsCompletedSuccessfully;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@
|
||||||
"net9.0-windows7.0": {
|
"net9.0-windows7.0": {
|
||||||
"DalamudPackager": {
|
"DalamudPackager": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[13.0.0, )",
|
"requested": "[13.1.0, )",
|
||||||
"resolved": "13.0.0",
|
"resolved": "13.1.0",
|
||||||
"contentHash": "Mb3cUDSK/vDPQ8gQIeuCw03EMYrej1B4J44a1AvIJ9C759p9XeqdU9Hg4WgOmlnlPe0G7ILTD32PKSUpkQNa8w=="
|
"contentHash": "XdoNhJGyFby5M/sdcRhnc5xTop9PHy+H50PTWpzLhJugjB19EDBiHD/AsiDF66RETM+0qKUdJBZrNuebn7qswQ=="
|
||||||
},
|
},
|
||||||
"DotNet.ReproducibleBuilds": {
|
"DotNet.ReproducibleBuilds": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
|
|
|
||||||
2
OtterGui
2
OtterGui
|
|
@ -1 +1 @@
|
||||||
Subproject commit 4a9b71a93e76aa5eed818542288329e34ec0dd89
|
Subproject commit f354444776591ae423e2d8374aae346308d81424
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit af41b1787acef9df7dc83619fe81e63a36443ee5
|
Subproject commit 648b6fc2ce600a95ab2b2ced27e1639af2b04502
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 15e7c8eb41867e6bbd3fe6a8885404df087bc7e7
|
Subproject commit a34f314cbc1053a09923a0d64aa3173044d32101
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 878acce46e286867d6ef1f8ecedb390f7bac34fd
|
Subproject commit c8611a0c546b6b2ec29214ab319fc2c38fe74793
|
||||||
Loading…
Add table
Add a link
Reference in a new issue