internal Dictionary <int, string> Save() { if (!_installed) { return(null); } Dictionary <int, string> _json = new Dictionary <int, string>(); foreach (KeyValuePair <int, object> x in _charaAccData) { FakeHairAccessoryInfo _info = new FakeHairAccessoryInfo(x.Value); _json[x.Key] = JSONSerializer.Serialize(typeof(FakeHairAccessoryInfo), _info); #if DEBUG DebugMsg(LogLevel.Debug, $"[HairAccessoryCustomizer][Save][{_chaCtrl.GetFullname()}][{x.Key}]\n{DisplayObjectInfo(_info)}\n\n"); #endif } return(_json); }
internal void Load(Dictionary <int, string> _json) { if (!_installed) { return; } _charaAccData.Clear(); if (_json == null) { return; } foreach (KeyValuePair <int, string> x in _json) { FakeHairAccessoryInfo _info = JSONSerializer.Deserialize <FakeHairAccessoryInfo>(x.Value); _charaAccData[x.Key] = _info.Convert(); #if DEBUG DebugMsg(LogLevel.Debug, $"[HairAccessoryCustomizer][Load][{_chaCtrl.GetFullname()}][{x.Key}]\n{DisplayObjectInfo(_charaAccData[x.Key])}\n\n"); #endif } }