0.604.0.6040508

This commit is contained in:
Max
2023-11-28 21:07:30 -06:00
parent 9f4f3bbf63
commit 4bac4d4f3e
17 changed files with 6548 additions and 5027 deletions

View File

@ -45,6 +45,12 @@ namespace RobloxFiles
/// <summary>The source AssetId this instance was created in.</summary>
public long SourceAssetId = -1;
/// <summary>Whether the instance defines security capabilities.</summary>
public bool DefinesCapabilities = false;
/// <summary>The SecurityCapabilities of this instance.</summary>
public ulong Capabilities = 0;
/// <summary>A unique identifier declared for the history of this instance.</summary>
public UniqueId HistoryId = new UniqueId(0, 0, 0);
@ -531,7 +537,7 @@ namespace RobloxFiles
if (newProp.Type == PropertyType.Ref)
refProps.Add(newProp);
newInst.AddProperty(ref newProp);
newInst.AddProperty(newProp);
}
var oldParent = oldInst.Parent;
@ -628,7 +634,7 @@ namespace RobloxFiles
/// Adds a property by reference to this Instance's property list.
/// </summary>
/// <param name="prop">A reference to the property that will be added.</param>
internal void AddProperty(ref Property prop)
internal void AddProperty(Property prop)
{
string name = prop.Name;
RemoveProperty(name);
@ -755,7 +761,7 @@ namespace RobloxFiles
Instance = this
};
AddProperty(ref newProp);
AddProperty(newProp);
}
else
{
@ -784,7 +790,7 @@ namespace RobloxFiles
if (GetProperty(name) == null)
{
var prop = new Property(name, propType);
AddProperty(ref prop);
AddProperty(prop);
}
}

View File

@ -42,7 +42,8 @@ namespace RobloxFiles
ProtectedString,
OptionalCFrame,
UniqueId,
FontFace
FontFace,
SecurityCapabilities,
}
public class Property
@ -58,8 +59,7 @@ namespace RobloxFiles
internal static BindingFlags BindingFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy | BindingFlags.IgnoreCase;
// TODO: Map typeof(ProtectedString) to PropertyType.ProtectedString
// if binary files are ever publicly allowed to read it.
// FIXME: Add a proper type for SecurityCapabilities once it's purpose is better understood.
public static readonly IReadOnlyDictionary<Type, PropertyType> Types = new Dictionary<Type, PropertyType>()
{
@ -95,8 +95,9 @@ namespace RobloxFiles
{ typeof(NumberSequence), PropertyType.NumberSequence },
{ typeof(Optional<CFrame>), PropertyType.OptionalCFrame },
{ typeof(ProtectedString), PropertyType.String },
{ typeof(PhysicalProperties), PropertyType.PhysicalProperties },
{ typeof(ProtectedString), PropertyType.ProtectedString },
{ typeof(PhysicalProperties), PropertyType.PhysicalProperties },
{ typeof(ulong), PropertyType.SecurityCapabilities },
};
private void ImproviseRawBuffer()