Merge branch 'main' into rework

# Conflicts:
#	Glamourer.GameData/Customization/CustomizationOptions.cs
#	Glamourer.GameData/Util/IconStorage.cs
#	Glamourer/Api/PenumbraAttach.cs
#	Glamourer/CharacterSave.cs
#	Glamourer/Designs/DesignManager.cs
#	Glamourer/Designs/FixedDesigns.cs
#	Glamourer/Glamourer.csproj
#	Glamourer/Gui/Interface.cs
#	Glamourer/Gui/InterfaceDesigns.cs
#	Glamourer/Gui/InterfaceEquipment.cs
#	Glamourer/Offsets.cs
#	Penumbra.PlayerWatch/Penumbra.PlayerWatch.csproj
This commit is contained in:
Ottermandias 2023-01-12 14:57:17 +01:00
commit b2cede67b8
7 changed files with 39 additions and 22 deletions

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework> <TargetFramework>net7.0-windows</TargetFramework>
<LangVersion>preview</LangVersion> <LangVersion>preview</LangVersion>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<RootNamespace>Glamourer</RootNamespace> <RootNamespace>Glamourer</RootNamespace>

View file

@ -130,28 +130,45 @@ public class DesignManager
//public void LoadFromFile() //public void LoadFromFile()
//{ //{
// _saveFile.Refresh(); // _saveFile.Refresh();
// SortedList<string, CharacterSave>? designs = null; // Designs = new SortedList<string, CharacterSave>();
// var changes = false;
// if (_saveFile.Exists) // if (_saveFile.Exists)
// try // try
// { // {
// var data = File.ReadAllText(_saveFile.FullName); // var data = File.ReadAllText(_saveFile.FullName);
// designs = JsonConvert.DeserializeObject<SortedList<string, CharacterSave>>(data); // var json = JsonConvert.DeserializeObject<Dictionary<string, string>>(data);
// if (json == null)
// {
// PluginLog.Error($"Save file {_saveFile.FullName} corrupted.");
// json = new Dictionary<string, string>();
// }
// foreach (var (name, saveString) in json)
// {
// try
// {
// var save = CharacterSave.FromString(saveString, out var oldVersion);
// changes |= oldVersion;
// changes |= !Designs.TryAdd(name, save);
// }
// catch (Exception e)
// {
// PluginLog.Error($"Character Save for {name} is invalid:\n{e}");
// changes = true;
// }
// }
// } // }
// catch (Exception e) // catch (Exception e)
// { // {
// PluginLog.Error($"Could not load save file {_saveFile.FullName}:\n{e}"); // PluginLog.Error($"Could not load save file {_saveFile.FullName}:\n{e}");
// changes = true;
// } // }
//
// if (designs == null)
// {
// Designs = new SortedList<string, CharacterSave>();
// SaveToFile();
// }
// else // else
// { // changes = true;
// Designs = designs;
// } // if (changes)
// // SaveToFile();
// BuildStructure(); // BuildStructure();
//} //}
} }

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework> <TargetFramework>net7.0-windows</TargetFramework>
<LangVersion>preview</LangVersion> <LangVersion>preview</LangVersion>
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<RootNamespace>Glamourer</RootNamespace> <RootNamespace>Glamourer</RootNamespace>
@ -119,7 +119,7 @@
</None> </None>
</ItemGroup> </ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent"> <Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="if $(Configuration) == Release powershell Compress-Archive -Force $(TargetPath), $(TargetDir)$(SolutionName).json, $(TargetDir)$(SolutionName).GameData.dll, $(TargetDir)Penumbra.GameData.dll, $(TargetDir)Penumbra.Api.dll $(SolutionDir)$(SolutionName).zip" /> <Exec Command="if $(Configuration) == Release powershell Compress-Archive -Force $(TargetPath), $(TargetDir)$(SolutionName).json, $(TargetDir)$(SolutionName).GameData.dll, $(TargetDir)Penumbra.GameData.dll, $(TargetDir)Penumbra.Api.dll, $(TargetDir)Penumbra.String.dll $(SolutionDir)$(SolutionName).zip" />
<Exec Command="if $(Configuration) == Release powershell Copy-Item -Force $(TargetDir)$(SolutionName).json -Destination $(SolutionDir)" /> <Exec Command="if $(Configuration) == Release powershell Copy-Item -Force $(TargetDir)$(SolutionName).json -Destination $(SolutionDir)" />
</Target> </Target>
</Project> </Project>

View file

@ -5,10 +5,10 @@
"Description": "Adds functionality to change and store appearance of players, customization and equip. Requires Penumbra to be installed and activated to work. Can also add preview options to the Changed Items tab for Penumbra.", "Description": "Adds functionality to change and store appearance of players, customization and equip. Requires Penumbra to be installed and activated to work. Can also add preview options to the Changed Items tab for Penumbra.",
"Tags": [ "Appearance", "Glamour", "Race", "Outfit", "Armor", "Clothes", "Skins", "Customization", "Design", "Character" ], "Tags": [ "Appearance", "Glamour", "Race", "Outfit", "Armor", "Clothes", "Skins", "Customization", "Design", "Character" ],
"InternalName": "Glamourer", "InternalName": "Glamourer",
"AssemblyVersion": "0.1.1.1", "AssemblyVersion": "0.1.1.2",
"RepoUrl": "https://github.com/Ottermandias/Glamourer", "RepoUrl": "https://github.com/Ottermandias/Glamourer",
"ApplicableVersion": "any", "ApplicableVersion": "any",
"DalamudApiLevel": 7, "DalamudApiLevel": 8,
"ImageUrls": null, "ImageUrls": null,
"IconUrl": "https://raw.githubusercontent.com/Ottermandias/Glamourer/master/images/icon.png" "IconUrl": "https://raw.githubusercontent.com/Ottermandias/Glamourer/master/images/icon.png"
} }

View file

@ -57,7 +57,7 @@ namespace Glamourer.Gui;
// //
// try // try
// { // {
// _selection!.Data = CharacterSave.FromString(text); // _selection!.Data.Load(text, out _);
// _designs.SaveToFile(); // _designs.SaveToFile();
// } // }
// catch (Exception e) // catch (Exception e)

View file

@ -106,7 +106,7 @@ namespace Glamourer.Gui;
// { // {
// 0 => SmallClothes, // 0 => SmallClothes,
// 9903 => SmallClothesNpc, // 9903 => SmallClothesNpc,
// _ => _identifier.Identify(set, weapon, variant, slot) ?? Unknown, // _ => _identifier.Identify(set, weapon, variant, slot).FirstOrDefault() ?? Unknown,
// }; // };
// } // }
// //

View file

@ -6,11 +6,11 @@
"Description": "Adds functionality to change and store appearance of players, customization and equip. Requires Penumbra to be installed and activated to work. Can also add preview options to the Changed Items tab for Penumbra.", "Description": "Adds functionality to change and store appearance of players, customization and equip. Requires Penumbra to be installed and activated to work. Can also add preview options to the Changed Items tab for Penumbra.",
"Tags": [ "Appearance", "Glamour", "Race", "Outfit", "Armor", "Clothes", "Skins", "Customization", "Design", "Character" ], "Tags": [ "Appearance", "Glamour", "Race", "Outfit", "Armor", "Clothes", "Skins", "Customization", "Design", "Character" ],
"InternalName": "Glamourer", "InternalName": "Glamourer",
"AssemblyVersion": "0.1.1.1", "AssemblyVersion": "0.1.1.2",
"TestingAssemblyVersion": "0.1.1.1", "TestingAssemblyVersion": "0.1.1.2",
"RepoUrl": "https://github.com/Ottermandias/Glamourer", "RepoUrl": "https://github.com/Ottermandias/Glamourer",
"ApplicableVersion": "any", "ApplicableVersion": "any",
"DalamudApiLevel": 7, "DalamudApiLevel": 8,
"IsHide": "False", "IsHide": "False",
"IsTestingExclusive": "false", "IsTestingExclusive": "false",
"DownloadCount": 1, "DownloadCount": 1,