| 12345678910111213141516171819202122232425262728293031323334 |
- using SOTF_Struct.Data;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace SOTF_Savegame_Editor.SOTFSave {
- public class PlayerInventorySaveData {
- public class DataObject {
- public string PlayerInventory { get; set; }
- }
- public string Version { get; set; }
- public DataObject Data { get; set; }
- protected PlayerInventory? _data = null;
- public PlayerInventory? PlayerInventory {
- get {
- if (this._data == null) {
- System.Text.Json.JsonSerializerOptions options = new() {
- NumberHandling = System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.AllowNamedFloatingPointLiterals,
- AllowTrailingCommas = true,
- IgnoreReadOnlyFields = true,
- IgnoreReadOnlyProperties = true
- };
- this._data = System.Text.Json.JsonSerializer.Deserialize<PlayerInventory>(this.Data.PlayerInventory.Replace("\"NaN\"", "0"), options);
- }
- return this._data;
- }
- }
- }
- }
|