Added support for saving XML files!
Support for binary files will be coming later.
This commit is contained in:
@ -12,11 +12,11 @@ namespace RobloxFiles
|
||||
public class Instance
|
||||
{
|
||||
/// <summary>The ClassName of this Instance.</summary>
|
||||
public readonly string ClassName;
|
||||
public string ClassName;
|
||||
|
||||
/// <summary>A list of properties that are defined under this Instance.</summary>
|
||||
public Dictionary<string, Property> Properties = new Dictionary<string, Property>();
|
||||
|
||||
|
||||
private List<Instance> Children = new List<Instance>();
|
||||
private Instance rawParent;
|
||||
|
||||
@ -24,6 +24,8 @@ namespace RobloxFiles
|
||||
public string Name => ReadProperty("Name", ClassName);
|
||||
public override string ToString() => Name;
|
||||
|
||||
internal string XmlReferent;
|
||||
|
||||
/// <summary>Creates an instance using the provided ClassName.</summary>
|
||||
/// <param name="className">The ClassName to use for this Instance.</param>
|
||||
public Instance(string className = "Instance")
|
||||
@ -292,7 +294,7 @@ namespace RobloxFiles
|
||||
/// This is used during the file loading procedure.
|
||||
/// </summary>
|
||||
/// <param name="prop">A reference to the property that will be added.</param>
|
||||
public void AddProperty(ref Property prop)
|
||||
internal void AddProperty(ref Property prop)
|
||||
{
|
||||
Properties.Add(prop.Name, prop);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ namespace RobloxFiles
|
||||
PhysicalProperties,
|
||||
Color3uint8,
|
||||
Int64,
|
||||
SharedString
|
||||
SharedString,
|
||||
}
|
||||
|
||||
public class Property
|
||||
@ -44,7 +44,9 @@ namespace RobloxFiles
|
||||
public PropertyType Type;
|
||||
public object Value;
|
||||
|
||||
public string XmlToken = "";
|
||||
private byte[] RawBuffer = null;
|
||||
|
||||
public bool HasRawBuffer
|
||||
{
|
||||
get
|
||||
|
Reference in New Issue
Block a user