Use actor identifiers in template editor
This commit is contained in:
@@ -11,6 +11,8 @@ using CustomizePlus.Core.Data;
|
||||
using CustomizePlus.Configuration.Services;
|
||||
using CustomizePlus.UI.Windows;
|
||||
using Dalamud.Interface.ImGuiNotification;
|
||||
using Penumbra.GameData.Actors;
|
||||
using CustomizePlus.Core.Helpers;
|
||||
|
||||
namespace CustomizePlus.Configuration.Data;
|
||||
|
||||
@@ -66,9 +68,8 @@ public class PluginConfiguration : IPluginConfiguration, ISavable
|
||||
public bool ShowLiveBones { get; set; } = true;
|
||||
|
||||
public bool BoneMirroringEnabled { get; set; } = false;
|
||||
public bool LimitLookupToOwnedObjects { get; set; } = false;
|
||||
|
||||
public string? PreviewCharacterName { get; set; } = null;
|
||||
public ActorIdentifier PreviewCharacter { get; set; } = ActorIdentifier.Invalid;
|
||||
|
||||
public int EditorValuesPrecision { get; set; } = 3;
|
||||
|
||||
@@ -134,6 +135,7 @@ public class PluginConfiguration : IPluginConfiguration, ISavable
|
||||
JsonConvert.PopulateObject(text, this, new JsonSerializerSettings
|
||||
{
|
||||
Error = HandleDeserializationError,
|
||||
Converters = new List<JsonConverter> { new ActorIdentifierJsonConverter() }
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -153,6 +155,7 @@ public class PluginConfiguration : IPluginConfiguration, ISavable
|
||||
{
|
||||
using var jWriter = new JsonTextWriter(writer) { Formatting = Formatting.Indented };
|
||||
var serializer = new JsonSerializer { Formatting = Formatting.Indented };
|
||||
serializer.Converters.Add(new ActorIdentifierJsonConverter());
|
||||
serializer.Serialize(jWriter, this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user