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

@ -130,28 +130,45 @@ public class DesignManager
//public void LoadFromFile()
//{
// _saveFile.Refresh();
// SortedList<string, CharacterSave>? designs = null;
// Designs = new SortedList<string, CharacterSave>();
// var changes = false;
// if (_saveFile.Exists)
// try
// {
// 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)
// {
// PluginLog.Error($"Could not load save file {_saveFile.FullName}:\n{e}");
// changes = true;
// }
//
// if (designs == null)
// {
// Designs = new SortedList<string, CharacterSave>();
// SaveToFile();
// }
// else
// {
// Designs = designs;
// }
//
// changes = true;
// if (changes)
// SaveToFile();
// BuildStructure();
//}
}