mirror of
https://github.com/aelurum/AssetStudio.git
synced 2026-11-15 19:28:48 -05:00
Some fixes for asset parsing via typetree
This commit is contained in:
@@ -32,7 +32,7 @@ namespace AssetStudio
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.WriteNumberValue((decimal)value);
|
||||
writer.WriteNumberValue((decimal)value + 0.0m);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace AssetStudio
|
||||
|
||||
public override void Write(Utf8JsonWriter writer, PPtr<T> value, JsonSerializerOptions options)
|
||||
{
|
||||
JsonSerializer.Serialize(value);
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,17 +32,17 @@ namespace AssetStudio
|
||||
var strKey = $"{kv.Key.Key}, {kv.Key.Value}";
|
||||
jsonDict.Add(strKey, kv.Value);
|
||||
}
|
||||
var strValue = JsonSerializer.Serialize(jsonDict, options).Replace(" ", " ");
|
||||
var strValue = JsonSerializer.SerializeToUtf8Bytes(jsonDict, options);
|
||||
writer.WriteRawValue(strValue);
|
||||
}
|
||||
}
|
||||
|
||||
private class GUID
|
||||
{
|
||||
[JsonPropertyName("data[0]")] public uint data0;
|
||||
[JsonPropertyName("data[1]")] public uint data1;
|
||||
[JsonPropertyName("data[2]")] public uint data2;
|
||||
[JsonPropertyName("data[3]")] public uint data3;
|
||||
[JsonPropertyName("data[0]")] public uint data0 { get; set; }
|
||||
[JsonPropertyName("data[1]")] public uint data1 { get; set; }
|
||||
[JsonPropertyName("data[2]")] public uint data2 { get; set; }
|
||||
[JsonPropertyName("data[3]")] public uint data3 { get; set; }
|
||||
|
||||
public Guid Convert()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user