diff --git a/BinaryFormat/BinaryFileChunk.cs b/BinaryFormat/BinaryFileChunk.cs index 61ba05c..6f99d7e 100644 --- a/BinaryFormat/BinaryFileChunk.cs +++ b/BinaryFormat/BinaryFileChunk.cs @@ -1,7 +1,10 @@ using System; using System.IO; using System.Text; +using System.IO.Compression; + using LZ4; +using ZstdSharp; namespace RobloxFiles.BinaryFormat { @@ -44,7 +47,34 @@ namespace RobloxFiles.BinaryFormat if (HasCompressedData) { CompressedData = reader.ReadBytes(CompressedSize); - Data = LZ4Codec.Decode(CompressedData, 0, CompressedSize, Size); + Data = new byte[Size]; + + using (var compStream = new MemoryStream(CompressedData)) + { + Stream decompStream = null; + + if (CompressedData[0] >= 0xF0) + { + // Probably LZ4 + decompStream = new LZ4Stream(compStream, CompressionMode.Decompress); + } + else if (CompressedData[0] == 0x78 || CompressedData[0] == 0x58) + { + // Probably zlib + decompStream = new DeflateStream(compStream, CompressionMode.Decompress); + } + else if (BitConverter.ToString(CompressedData, 1, 3) == "B5-2F-FD") + { + // Probably zstd + decompStream = new DecompressionStream(compStream); + } + + if (decompStream == null) + throw new Exception("Unsupported compression scheme!"); + + decompStream.Read(Data, 0, Size); + decompStream.Dispose(); + } } else { diff --git a/DataTypes/CFrame.cs b/DataTypes/CFrame.cs index 07b2a4e..ac3720e 100644 --- a/DataTypes/CFrame.cs +++ b/DataTypes/CFrame.cs @@ -32,7 +32,7 @@ namespace RobloxFiles.DataTypes public Vector3 ColumnY => new Vector3(m21, m22, m23); public Vector3 ColumnZ => new Vector3(m31, m32, m33); - public static readonly CFrame Identity = new CFrame(); + public static readonly CFrame identity = new CFrame(); public override int GetHashCode() { diff --git a/DataTypes/FontFace.cs b/DataTypes/FontFace.cs index c714ba7..8e4a186 100644 --- a/DataTypes/FontFace.cs +++ b/DataTypes/FontFace.cs @@ -1,4 +1,5 @@ using RobloxFiles.Enums; +using RobloxFiles.Utility; namespace RobloxFiles.DataTypes { @@ -27,6 +28,23 @@ namespace RobloxFiles.DataTypes Style = style; } + public static FontFace FromEnum(Font font) + { + return FontUtility.FontFaces[font]; + } + + public static FontFace FromName(string name, FontWeight weight = FontWeight.Regular, FontStyle style = FontStyle.Normal) + { + Content url = $"rbxasset://fonts/families/{name}.json"; + return new FontFace(url, weight, style); + } + + public static FontFace FromId(ulong id, FontWeight weight = FontWeight.Regular, FontStyle style = FontStyle.Normal) + { + Content url = $"rbxassetid://{id}"; + return new FontFace(url, weight, style); + } + public override string ToString() { return $"Font {{ Family = {Family}, Weight = {Weight}, Style = {Style}}}"; diff --git a/DataTypes/Vector2.cs b/DataTypes/Vector2.cs index a3083a6..ea73f21 100644 --- a/DataTypes/Vector2.cs +++ b/DataTypes/Vector2.cs @@ -64,8 +64,8 @@ namespace RobloxFiles.DataTypes public static Vector2 zero => new Vector2(0, 0); public static Vector2 one => new Vector2(1, 1); - public static Vector2 x => new Vector2(1, 0); - public static Vector2 y => new Vector2(0, 1); + public static Vector2 xAxis => new Vector2(1, 0); + public static Vector2 yAxis => new Vector2(0, 1); public float Dot(Vector2 other) => (X * other.X) + (Y * other.Y); public Vector2 Cross(Vector2 other) => new Vector2(X * other.Y, Y * other.X); diff --git a/Generated/Classes.cs b/Generated/Classes.cs index a7aa0b0..37bf586 100644 --- a/Generated/Classes.cs +++ b/Generated/Classes.cs @@ -1,5 +1,5 @@ // Auto-generated list of creatable Roblox classes. -// Updated as of 0.548.0.5480523 +// Updated as of 0.554.1.5540506 using System; @@ -13,7 +13,7 @@ namespace RobloxFiles { public class Accoutrement : Instance { - public CFrame AttachmentPoint = new CFrame(); + public CFrame AttachmentPoint = CFrame.identity; } public class Accessory : Accoutrement @@ -103,12 +103,17 @@ namespace RobloxFiles public class AnimationRigData : Instance { + public byte[] articulatedJoint = Convert.FromBase64String("AQAAAAAAAAA="); + public byte[] endEffectorRotationConstraint = Convert.FromBase64String("AQAAAAAAAAA="); + public byte[] endEffectorTranslationConstraint = Convert.FromBase64String("AQAAAAAAAAA="); + public byte[] facsControl = Convert.FromBase64String("AQAAAAAAAAA="); public byte[] label = Convert.FromBase64String("AQAAAAEAAAAAAAAA"); public byte[] name = Convert.FromBase64String("AQAAAAEAAAAAAAAA"); public byte[] parent = Convert.FromBase64String("AQAAAAEAAAAAAA=="); public byte[] postTransform = Convert.FromBase64String("AQAAAAEAAAAAAIA/AAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAAAAAAAAAAA="); public byte[] preTransform = Convert.FromBase64String("AQAAAAEAAAAAAIA/AAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAAAAAAAAAAA="); public byte[] transform = Convert.FromBase64String("AQAAAAEAAAAAAIA/AAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAAAAAAAAAAA="); + public byte[] weight = Convert.FromBase64String("AQAAAAAAAAA="); } public class Animator : Instance @@ -138,6 +143,10 @@ namespace RobloxFiles { IsService = true; } + + public string Interface = ""; + public int Port = 0; + public bool StartServer; } public class AssetImportService : Instance @@ -176,7 +185,7 @@ namespace RobloxFiles public class Attachment : Instance { - public CFrame CFrame = new CFrame(); + public CFrame CFrame = CFrame.identity; public bool Visible; } @@ -219,7 +228,7 @@ namespace RobloxFiles { public bool CanBeDropped = true; public bool Enabled = true; - public CFrame Grip = new CFrame(); + public CFrame Grip = CFrame.identity; public bool ManualActivationOnly; public bool RequiresHandle = true; public string ToolTip = ""; @@ -270,20 +279,20 @@ namespace RobloxFiles public abstract class BaseWrap : Instance { public Content CageMeshId = ""; - public CFrame CageOrigin = new CFrame(); + public CFrame CageOrigin = CFrame.identity; public Content HSRAssetId = ""; - public CFrame ImportOrigin = new CFrame(); + public CFrame ImportOrigin = CFrame.identity; } public class WrapLayer : BaseWrap { public WrapLayerAutoSkin AutoSkin = WrapLayerAutoSkin.Disabled; - public CFrame BindOffset = new CFrame(); + public CFrame BindOffset = CFrame.identity; public bool Enabled = true; public int Order = 1; public float Puffiness = 1; public Content ReferenceMeshId = ""; - public CFrame ReferenceOrigin = new CFrame(); + public CFrame ReferenceOrigin = CFrame.identity; public float ShrinkFactor = 0; } @@ -350,7 +359,7 @@ namespace RobloxFiles public class BodyForce : BodyMover { - public Vector3 Force = new Vector3(0, 1, 0); + public Vector3 Force = Vector3.yAxis; [Obsolete] public Vector3 force @@ -362,7 +371,7 @@ namespace RobloxFiles public class BodyGyro : BodyMover { - public CFrame CFrame = new CFrame(); + public CFrame CFrame = CFrame.identity; public float D = 500; public Vector3 MaxTorque = new Vector3(400000, 0, 400000); public float P = 3000; @@ -406,8 +415,8 @@ namespace RobloxFiles public class BodyThrust : BodyMover { - public Vector3 Force = new Vector3(0, 1, 0); - public Vector3 Location = new Vector3(); + public Vector3 Force = Vector3.yAxis; + public Vector3 Location = Vector3.zero; [Obsolete] public Vector3 force @@ -452,7 +461,7 @@ namespace RobloxFiles public float MaxThrust = 4000; public Vector3 MaxTorque = new Vector3(400000, 400000, 0); public BasePart Target; - public Vector3 TargetOffset = new Vector3(); + public Vector3 TargetOffset = Vector3.zero; public float TargetRadius = 4; public float ThrustD = 0.001f; public float ThrustP = 5; @@ -689,7 +698,7 @@ namespace RobloxFiles public class AlignOrientation : Constraint { public AlignType AlignType = AlignType.Parallel; - public CFrame CFrame = new CFrame(); + public CFrame CFrame = CFrame.identity; public float MaxAngularVelocity = float.MaxValue; public float MaxTorque = 10000; public OrientationAlignmentMode Mode = OrientationAlignmentMode.TwoAttachment; @@ -710,7 +719,7 @@ namespace RobloxFiles public float MaxForce = 10000; public float MaxVelocity = float.MaxValue; public PositionAlignmentMode Mode = PositionAlignmentMode.TwoAttachment; - public Vector3 Position = new Vector3(); + public Vector3 Position = Vector3.zero; public bool ReactionForceEnabled; public float Responsiveness = 10; public bool RigidityEnabled; @@ -718,12 +727,19 @@ namespace RobloxFiles public class AngularVelocity : Constraint { - public Vector3 AngularVelocity_ = new Vector3(); + public Vector3 AngularVelocity_ = Vector3.zero; public float MaxTorque = 0; public bool ReactionTorqueEnabled; public ActuatorRelativeTo RelativeTo = ActuatorRelativeTo.World; } + public class AnimationConstraint : Constraint + { + public float MaxForce = 10000; + public float MaxTorque = 10000; + public CFrame Transform = CFrame.identity; + } + public class BallSocketConstraint : Constraint { public BallSocketConstraint() : base() @@ -732,6 +748,13 @@ namespace RobloxFiles } public bool LimitsEnabled; + + public float MaxFrictionTorque + { + get => MaxFrictionTorqueXml; + set => MaxFrictionTorqueXml = value; + } + public float MaxFrictionTorqueXml = 0; public float Radius = 0.15f; public float Restitution = 0; @@ -779,14 +802,14 @@ namespace RobloxFiles Color = BrickColor.FromNumber(26); } - public Vector3 LineDirection = new Vector3(1, 0, 0); + public Vector3 LineDirection = Vector3.xAxis; public float LineVelocity = 0; public float MaxForce = 1000; - public Vector2 PlaneVelocity = new Vector2(); - public Vector3 PrimaryTangentAxis = new Vector3(1, 0, 0); + public Vector2 PlaneVelocity = Vector2.zero; + public Vector3 PrimaryTangentAxis = Vector3.xAxis; public ActuatorRelativeTo RelativeTo = ActuatorRelativeTo.World; - public Vector3 SecondaryTangentAxis = new Vector3(0, 1, 0); - public Vector3 VectorVelocity = new Vector3(); + public Vector3 SecondaryTangentAxis = Vector3.yAxis; + public Vector3 VectorVelocity = Vector3.zero; public VelocityConstraintMode VelocityConstraintMode = VelocityConstraintMode.Vector; } @@ -920,7 +943,7 @@ namespace RobloxFiles public class Torque : Constraint { public ActuatorRelativeTo RelativeTo = ActuatorRelativeTo.Attachment0; - public Vector3 Torque_ = new Vector3(); + public Vector3 Torque_ = Vector3.zero; } public class TorsionSpringConstraint : Constraint @@ -1005,10 +1028,12 @@ namespace RobloxFiles public class AirController : ControllerBase { public bool CancelAirMomentum = true; - public float MoveMaxForce = 10000; + public bool MaintainAngularMomentum = true; + public bool MaintainLinearMomentum = true; + public float MoveMaxForce = 1000; public float OrientationMaxTorque = 10000; public float OrientationSpeedFactor = 1; - public Vector3 VectorForce = new Vector3(); + public Vector3 VectorForce = Vector3.zero; } public class ClimbController : ControllerBase @@ -1047,8 +1072,8 @@ namespace RobloxFiles { public float BaseMoveSpeed = 16; public float BaseTurnSpeed = 8; - public Vector3 FacingDirection = new Vector3(0, 0, 1); - public Vector3 MovingDirection = new Vector3(); + public Vector3 FacingDirection = Vector3.zAxis; + public Vector3 MovingDirection = Vector3.zero; } public class ControllerService : Instance @@ -1097,9 +1122,9 @@ namespace RobloxFiles { public LevelOfDetailSetting LODX = LevelOfDetailSetting.High; public LevelOfDetailSetting LODY = LevelOfDetailSetting.High; - public Vector3 Offset = new Vector3(); - public Vector3 Scale = new Vector3(1, 1, 1); - public Vector3 VertexColor = new Vector3(1, 1, 1); + public Vector3 Offset = Vector3.zero; + public Vector3 Scale = Vector3.one; + public Vector3 VertexColor = Vector3.one; } public abstract class BevelMesh : DataModelMesh @@ -1199,7 +1224,7 @@ namespace RobloxFiles public DialogPurpose Purpose = DialogPurpose.Help; public DialogTone Tone = DialogTone.Neutral; public float TriggerDistance = 0; - public Vector3 TriggerOffset = new Vector3(); + public Vector3 TriggerOffset = Vector3.zero; } public class DialogChoice : Instance @@ -1243,13 +1268,29 @@ namespace RobloxFiles } } + public class ExperienceAuthService : Instance + { + public ExperienceAuthService() + { + IsService = true; + } + } + + public class ExperienceInviteOptions : Instance + { + public string InviteMessageId = ""; + public long InviteUser = 0; + public string LaunchData = ""; + public string PromptMessage = ""; + } + public class Explosion : Instance { public float BlastPressure = 500000; public float BlastRadius = 4; public float DestroyJointRadiusPercent = 1; public ExplosionType ExplosionType = ExplosionType.Craters; - public Vector3 Position = new Vector3(); + public Vector3 Position = Vector3.zero; public float TimeScale = 1; public bool Visible = true; } @@ -1310,6 +1351,16 @@ namespace RobloxFiles } } + public class FacialAnimationStreamingServiceV2 : Instance + { + public FacialAnimationStreamingServiceV2() + { + IsService = true; + } + + public int ServiceState = 0; + } + public abstract class Feature : Instance { public NormalId FaceId = NormalId.Right; @@ -1438,7 +1489,7 @@ namespace RobloxFiles public class GetTextBoundsParams : Instance { - public FontFace Font = new FontFace("rbxasset://fonts/families/SourceSansPro.json"); + public FontFace Font = FontFace.FromEnum(Enums.Font.SourceSans); public float Size = 20; public string Text = ""; public float Width = 0; @@ -1478,7 +1529,7 @@ namespace RobloxFiles public abstract class GuiObject : GuiBase2d { public bool Active; - public Vector2 AnchorPoint = new Vector2(); + public Vector2 AnchorPoint = Vector2.zero; public AutomaticSize AutomaticSize = AutomaticSize.None; [Obsolete] @@ -1572,8 +1623,8 @@ namespace RobloxFiles public Content HoverImage = ""; public Content Image = ""; public Color3 ImageColor3 = new Color3(1, 1, 1); - public Vector2 ImageRectOffset = new Vector2(); - public Vector2 ImageRectSize = new Vector2(); + public Vector2 ImageRectOffset = Vector2.zero; + public Vector2 ImageRectSize = Vector2.zero; public float ImageTransparency = 0; public Content PressedImage = ""; public ResamplerMode ResampleMode = ResamplerMode.Default; @@ -1592,8 +1643,13 @@ namespace RobloxFiles Selectable = true; } - public Font Font = Font.Legacy; - public FontFace FontFace = new FontFace("rbxasset://fonts/families/LegacyArial.json"); + public Font Font + { + get => FontUtility.GetLegacyFont(FontFace); + set => FontUtility.TryGetFontFace(value, out FontFace); + } + + public FontFace FontFace = FontFace.FromEnum(Enums.Font.Legacy); [Obsolete] public FontSize FontSize @@ -1662,8 +1718,8 @@ namespace RobloxFiles public Content Image = ""; public Color3 ImageColor3 = new Color3(1, 1, 1); - public Vector2 ImageRectOffset = new Vector2(); - public Vector2 ImageRectSize = new Vector2(); + public Vector2 ImageRectOffset = Vector2.zero; + public Vector2 ImageRectSize = Vector2.zero; public float ImageTransparency = 0; public ResamplerMode ResampleMode = ResamplerMode.Default; public ScaleType ScaleType = ScaleType.Stretch; @@ -1679,8 +1735,13 @@ namespace RobloxFiles ClipsDescendants = false; } - public Font Font = Font.Legacy; - public FontFace FontFace = new FontFace("rbxasset://fonts/families/LegacyArial.json"); + public Font Font + { + get => FontUtility.GetLegacyFont(FontFace); + set => FontUtility.TryGetFontFace(value, out FontFace); + } + + public FontFace FontFace = FontFace.FromEnum(Enums.Font.Legacy); [Obsolete] public FontSize FontSize @@ -1742,7 +1803,7 @@ namespace RobloxFiles public AutomaticSize AutomaticCanvasSize = AutomaticSize.None; public Content BottomImage = "rbxasset://textures/ui/Scroll/scroll-bottom.png"; - public Vector2 CanvasPosition = new Vector2(); + public Vector2 CanvasPosition = Vector2.zero; public UDim2 CanvasSize = new UDim2(0, 0, 2, 0); public ElasticBehavior ElasticBehavior = ElasticBehavior.WhenScrollable; public ScrollBarInset HorizontalScrollBarInset = ScrollBarInset.None; @@ -1767,8 +1828,14 @@ namespace RobloxFiles } public bool ClearTextOnFocus = true; - public Font Font = Font.Legacy; - public FontFace FontFace = new FontFace("rbxasset://fonts/families/LegacyArial.json"); + + public Font Font + { + get => FontUtility.GetLegacyFont(FontFace); + set => FontUtility.TryGetFontFace(value, out FontFace); + } + + public FontFace FontFace = FontFace.FromEnum(Enums.Font.Legacy); [Obsolete] public FontSize FontSize @@ -1847,7 +1914,7 @@ namespace RobloxFiles } public Color3 Ambient = Color3.FromRGB(200, 200, 200); - public CFrame CameraCFrame = new CFrame(); + public CFrame CameraCFrame = CFrame.identity; public float CameraFieldOfView = 70; public Color3 ImageColor3 = new Color3(1, 1, 1); public float ImageTransparency = 0; @@ -1872,21 +1939,23 @@ namespace RobloxFiles public float DistanceLowerLimit = 0; public float DistanceStep = 0; public float DistanceUpperLimit = -1; - public Vector3 ExtentsOffset = new Vector3(); - public Vector3 ExtentsOffsetWorldSpace = new Vector3(); + public Vector3 ExtentsOffset = Vector3.zero; + public Vector3 ExtentsOffsetWorldSpace = Vector3.zero; public float LightInfluence = 0; public float MaxDistance = float.MaxValue; public Instance PlayerToHideFrom; public UDim2 Size = new UDim2(); - public Vector2 SizeOffset = new Vector2(); - public Vector3 StudsOffset = new Vector3(); - public Vector3 StudsOffsetWorldSpace = new Vector3(); + public Vector2 SizeOffset = Vector2.zero; + public Vector3 StudsOffset = Vector3.zero; + public Vector3 StudsOffsetWorldSpace = Vector3.zero; } public class ScreenGui : LayerCollector { + public bool ClipToDeviceSafeArea = true; public int DisplayOrder = 0; - public bool IgnoreGuiInset; + public SafeAreaCompatibility SafeAreaCompatibility = SafeAreaCompatibility.FullscreenExtension; + public ScreenInsets ScreenInsets = ScreenInsets.CoreUISafeInsets; } public class GuiMain : ScreenGui @@ -1897,7 +1966,7 @@ namespace RobloxFiles { public bool Active = true; public Instance Adornee; - public NormalId Face = NormalId.Back; + public NormalId Face = NormalId.Front; } public class AdGui : SurfaceGuiBase @@ -1907,11 +1976,6 @@ namespace RobloxFiles public class SurfaceGui : SurfaceGuiBase { - public SurfaceGui() : base() - { - Face = NormalId.Front; - } - public bool AlwaysOnTop; public float Brightness = 1; public Vector2 CanvasSize = new Vector2(800, 600); @@ -1943,7 +2007,7 @@ namespace RobloxFiles public BasePart From; public float StudsBetweenTextures = 4; public Content Texture = ""; - public Vector2 TextureSize = new Vector2(1, 1); + public Vector2 TextureSize = Vector2.one; public BasePart To; public float Velocity = 2; public float WireRadius = 0.0625f; @@ -1978,14 +2042,14 @@ namespace RobloxFiles { public AdornCullingMode AdornCullingMode = AdornCullingMode.Automatic; public bool AlwaysOnTop; - public CFrame CFrame = new CFrame(); - public Vector3 SizeRelativeOffset = new Vector3(); + public CFrame CFrame = CFrame.identity; + public Vector3 SizeRelativeOffset = Vector3.zero; public int ZIndex = -1; } public class BoxHandleAdornment : HandleAdornment { - public Vector3 Size = new Vector3(1, 1, 1); + public Vector3 Size = Vector3.one; } public class ConeHandleAdornment : HandleAdornment @@ -2011,7 +2075,7 @@ namespace RobloxFiles } public Content Image = "rbxasset://textures/SurfacesDefault.png"; - public Vector2 Size = new Vector2(1, 1); + public Vector2 Size = Vector2.one; } public class LineHandleAdornment : HandleAdornment @@ -2083,7 +2147,7 @@ namespace RobloxFiles public class SelectionPointLasso : SelectionLasso { - public Vector3 Point = new Vector3(); + public Vector3 Point = Vector3.zero; } public class GuiService : Instance @@ -2173,7 +2237,7 @@ namespace RobloxFiles public HumanoidHealthDisplayType HealthDisplayType = HumanoidHealthDisplayType.DisplayWhenDamaged; public float Health_XML = 100; public float HipHeight = 0; - public Vector3 InternalBodyScale = new Vector3(1, 1, 1); + public Vector3 InternalBodyScale = Vector3.one; public float InternalHeadScale = 1; public float JumpHeight = 7.2f; public float JumpPower = 50; @@ -2241,11 +2305,11 @@ namespace RobloxFiles public class IKControl : Instance { - public CFrame AlignmentOffset = new CFrame(); public Instance ChainRoot; public bool Enabled = true; public Instance EndEffector; - public CFrame Offset = new CFrame(); + public CFrame EndEffectorOffset = CFrame.identity; + public CFrame Offset = CFrame.identity; public Instance Pole; public int Priority = 0; public Instance Target; @@ -2303,8 +2367,8 @@ namespace RobloxFiles public abstract class JointInstance : Instance { - public CFrame C0 = new CFrame(); - public CFrame C1 = new CFrame(); + public CFrame C0 = CFrame.identity; + public CFrame C1 = CFrame.identity; public bool Enabled = true; public BasePart Part0; public BasePart Part1; @@ -2325,10 +2389,10 @@ namespace RobloxFiles public class Glue : JointInstance { - public Vector3 F0 = new Vector3(); - public Vector3 F1 = new Vector3(); - public Vector3 F2 = new Vector3(); - public Vector3 F3 = new Vector3(); + public Vector3 F0 = Vector3.zero; + public Vector3 F1 = Vector3.zero; + public Vector3 F2 = Vector3.zero; + public Vector3 F3 = Vector3.zero; } public abstract class ManualSurfaceJointInstance : JointInstance @@ -2757,7 +2821,7 @@ namespace RobloxFiles set => Color = value?.Color; } - public CFrame CFrame = new CFrame(); + public CFrame CFrame = CFrame.identity; public bool CanCollide = true; public bool CanQuery = true; public bool CanTouch = true; @@ -2813,7 +2877,7 @@ namespace RobloxFiles } public string MaterialVariantSerialized = ""; - public CFrame PivotOffset = new CFrame(); + public CFrame PivotOffset = CFrame.identity; public Vector3 Position { @@ -2837,7 +2901,7 @@ namespace RobloxFiles public int RootPriority = 0; [Obsolete] - public Vector3 RotVelocity = new Vector3(); + public Vector3 RotVelocity = Vector3.zero; public Vector3 Size { @@ -2859,7 +2923,7 @@ namespace RobloxFiles public float Transparency = 0; [Obsolete] - public Vector3 Velocity = new Vector3(); + public Vector3 Velocity = Vector3.zero; [Obsolete] public BrickColor brickColor @@ -3006,6 +3070,7 @@ namespace RobloxFiles public bool Decoration; public byte[] MaterialColors = Convert.FromBase64String("AAAAAAAAan8/P39rf2Y/ilY+j35fi21PZmxvZbDqw8faiVpHOi4kHh4lZlw76JxKc3trhHtagcLgc4RKxr21zq2UlJSM"); public byte[] PhysicsGrid = Convert.FromBase64String("AgMAAAAAAAAAAAAAAAA="); + public bool ShorelinesUpgraded; public byte[] SmoothGrid = Convert.FromBase64String("AQU="); public Color3 WaterColor = Color3.FromRGB(12, 84, 91); public float WaterReflectance = 1; @@ -3022,7 +3087,7 @@ namespace RobloxFiles size = new Vector3(4, 1.2f, 2); } - public Vector3 InitialSize = new Vector3(1, 1, 1); + public Vector3 InitialSize = Vector3.one; public byte[] LODData; public SharedString PhysicalConfigData = SharedString.FromBase64("1B2M2Y8AsgTpgAmY7PhCfg=="); public byte[] PhysicsData; @@ -3039,7 +3104,7 @@ namespace RobloxFiles public bool DoubleSided; public bool HasJointOffset; public bool HasSkinnedMesh; - public Vector3 JointOffset = new Vector3(); + public Vector3 JointOffset = Vector3.zero; public Content MeshId = ""; public RenderFidelity RenderFidelity = RenderFidelity.Precise; public Content TextureID = ""; @@ -3139,9 +3204,9 @@ namespace RobloxFiles public class Model : PVInstance { public ModelLevelOfDetail LevelOfDetail = ModelLevelOfDetail.Automatic; - public CFrame ModelMeshCFrame = new CFrame(); + public CFrame ModelMeshCFrame = CFrame.identity; public SharedString ModelMeshData = SharedString.FromBase64("yuZpQdnvvUBOTYh1jqZ2cA=="); - public Vector3 ModelMeshSize = new Vector3(); + public Vector3 ModelMeshSize = Vector3.zero; public ModelStreamingMode ModelStreamingMode = ModelStreamingMode.Default; public bool NeedsPivotMigration; public BasePart PrimaryPart; @@ -3171,7 +3236,7 @@ namespace RobloxFiles public double DistributedGameTime = 0; public bool ExplicitAutoJoints = true; public float FallenPartsDestroyHeight = -500; - public Vector3 GlobalWind = new Vector3(); + public Vector3 GlobalWind = Vector3.zero; public float Gravity = 196.2f; public HumanoidOnlySetCollisionsOnStateChange HumanoidOnlySetCollisionsOnStateChange = HumanoidOnlySetCollisionsOnStateChange.Default; public InterpolationThrottlingMode InterpolationThrottling = InterpolationThrottlingMode.Default; @@ -3226,7 +3291,7 @@ namespace RobloxFiles public class ParticleEmitter : Instance { - public Vector3 Acceleration = new Vector3(); + public Vector3 Acceleration = Vector3.zero; public float Brightness = 1; public ColorSequence Color = new ColorSequence(1, 1, 1); public float Drag = 0; @@ -3251,7 +3316,7 @@ namespace RobloxFiles public ParticleEmitterShapeStyle ShapeStyle = ParticleEmitterShapeStyle.Volume; public NumberSequence Size = new NumberSequence(1); public NumberRange Speed = new NumberRange(5); - public Vector2 SpreadAngle = new Vector2(); + public Vector2 SpreadAngle = Vector2.zero; public NumberSequence Squash = new NumberSequence(0); public Content Texture = "rbxasset://textures/particles/sparkles_main.dds"; public float TimeScale = 1; @@ -3334,6 +3399,7 @@ namespace RobloxFiles public int MaxPlayersInternal = 16; public int PreferredPlayersInternal = 0; public float RespawnTime = 5; + public bool UseStrafingAnimations; } public class PluginAction : Instance @@ -3405,7 +3471,7 @@ namespace RobloxFiles public class Pose : PoseBase { - public CFrame CFrame = new CFrame(); + public CFrame CFrame = CFrame.identity; [Obsolete] public float MaskWeight = 0; @@ -3473,7 +3539,7 @@ namespace RobloxFiles public bool RequiresLineOfSight = true; public LocalizationTable RootLocalizationTable; public ProximityPromptStyle Style = ProximityPromptStyle.Default; - public Vector2 UIOffset = new Vector2(); + public Vector2 UIOffset = Vector2.zero; } public class ProximityPromptService : Instance @@ -3593,7 +3659,7 @@ namespace RobloxFiles public class RenderingTest : Instance { - public CFrame CFrame = new CFrame(); + public CFrame CFrame = CFrame.identity; public int ComparisonDiffThreshold = 10; public RenderingTestComparisonMethod ComparisonMethod = RenderingTestComparisonMethod.psnr; public float ComparisonPsnrThreshold = 50; @@ -3745,6 +3811,14 @@ namespace RobloxFiles } } + public class ShorelineUpgraderService : Instance + { + public ShorelineUpgraderService() + { + IsService = true; + } + } + public class Sky : Instance { public bool CelestialBodiesShown = true; @@ -3809,6 +3883,7 @@ namespace RobloxFiles public class Sound : Instance { public float EmitterSize = 10; + public NumberRange LoopRegion = new NumberRange(0, 60000); public bool Looped; [Obsolete] @@ -3833,6 +3908,8 @@ namespace RobloxFiles } public bool PlayOnRemove; + public NumberRange PlaybackRegion = new NumberRange(0, 60000); + public bool PlaybackRegionsEnabled; public float PlaybackSpeed = 1; public bool Playing; public RollOffMode RollOffMode = RollOffMode.Inverse; @@ -4031,6 +4108,7 @@ namespace RobloxFiles public NumberRange GameSettingsScaleRangeProportion = new NumberRange(0, 1); public NumberRange GameSettingsScaleRangeWidth = new NumberRange(0.7f, 1); public float HealthDisplayDistance = 100; + public HumanoidStateMachineMode HumanoidStateMachineMode = HumanoidStateMachineMode.Default; public bool LoadCharacterAppearance = true; public LoadCharacterLayeredClothing LoadCharacterLayeredClothing = LoadCharacterLayeredClothing.Default; public float NameDisplayDistance = 100; @@ -4072,8 +4150,6 @@ namespace RobloxFiles public string CommitInflightGuid = ""; public int CommitInflightPlaceVersion = 0; public bool EnableScriptCollabByDefaultOnLoad; - public long SrcPlaceId = 0; - public long SrcUniverseId = 0; } public class StudioDeviceEmulatorService : Instance @@ -4190,7 +4266,7 @@ namespace RobloxFiles public Content NormalMap = ""; public Content RoughnessMap = ""; public float StudsPerTile = 10; - public Content TexturePack1 = ""; + public Content TexturePack = ""; } public class TerrainRegion : Instance @@ -4244,13 +4320,32 @@ namespace RobloxFiles public class ChatInputBarConfiguration : TextChatConfigurations { + public Color3 BackgroundColor3 = Color3.FromRGB(25, 27, 29); + public double BackgroundTransparency = 0.2; public bool Enabled = true; + public FontFace FontFace = FontFace.FromEnum(Enums.Font.GothamMedium); + public Color3 PlaceholderColor3 = Color3.FromRGB(178, 178, 178); public TextChannel TargetTextChannel; + public Color3 TextColor3 = new Color3(1, 1, 1); + public long TextSize = 14; + public Color3 TextStrokeColor3 = new Color3(); + public double TextStrokeTransparency = 0.5; } public class ChatWindowConfiguration : TextChatConfigurations { + public Color3 BackgroundColor3 = Color3.FromRGB(25, 27, 29); + public double BackgroundTransparency = 0.3; public bool Enabled = true; + public FontFace FontFace = FontFace.FromEnum(Enums.Font.GothamMedium); + public float HeightScale = 1; + public HorizontalAlignment HorizontalAlignment = HorizontalAlignment.Left; + public Color3 TextColor3 = new Color3(1, 1, 1); + public long TextSize = 14; + public Color3 TextStrokeColor3 = new Color3(); + public double TextStrokeTransparency = 0.5; + public VerticalAlignment VerticalAlignment = VerticalAlignment.Top; + public float WidthScale = 1; } public class TextChatMessageProperties : Instance @@ -4375,7 +4470,7 @@ namespace RobloxFiles public class UISizeConstraint : UIConstraint { public Vector2 MaxSize = new Vector2(float.MaxValue, float.MaxValue); - public Vector2 MinSize = new Vector2(); + public Vector2 MinSize = Vector2.zero; } public class UITextSizeConstraint : UIConstraint @@ -4393,7 +4488,7 @@ namespace RobloxFiles { public ColorSequence Color = new ColorSequence(1, 1, 1); public bool Enabled = true; - public Vector2 Offset = new Vector2(); + public Vector2 Offset = Vector2.zero; public float Rotation = 0; public NumberSequence Transparency = new NumberSequence(0); } @@ -4536,7 +4631,7 @@ namespace RobloxFiles public class CFrameValue : ValueBase { - public CFrame Value = new CFrame(); + public CFrame Value = CFrame.identity; } public class Color3Value : ValueBase @@ -4611,7 +4706,7 @@ namespace RobloxFiles public class Vector3Value : ValueBase { - public Vector3 Value = new Vector3(); + public Vector3 Value = Vector3.zero; } public class Vector3Curve : Instance @@ -4650,6 +4745,14 @@ namespace RobloxFiles } } + public class VisibilityCheckDispatcher : Instance + { + public VisibilityCheckDispatcher() + { + IsService = true; + } + } + public class Visit : Instance { public Visit() @@ -4678,8 +4781,8 @@ namespace RobloxFiles public class WeldConstraint : Instance { - public CFrame CFrame0 = new CFrame(); - public CFrame CFrame1 = new CFrame(); + public CFrame CFrame0 = CFrame.identity; + public CFrame CFrame1 = CFrame.identity; public bool Enabled { diff --git a/Generated/Enums.cs b/Generated/Enums.cs index 044a96b..71efac1 100644 --- a/Generated/Enums.cs +++ b/Generated/Enums.cs @@ -1,5 +1,5 @@ // Auto-generated list of Roblox enums. -// Updated as of 0.548.0.5480523 +// Updated as of 0.554.1.5540506 namespace RobloxFiles.Enums { @@ -465,6 +465,14 @@ namespace RobloxFiles.Enums R15 } + public enum HumanoidStateMachineMode + { + Default, + Legacy, + NoStateMachine, + LuaStateMachine + } + public enum IKControlType { Transform, @@ -867,7 +875,8 @@ namespace RobloxFiles.Enums public enum ModelStreamingMode { Default, - Atomic + Atomic, + Persistent } public enum MouseBehavior @@ -938,9 +947,9 @@ namespace RobloxFiles.Enums public enum ParticleFlipbookLayout { None, - TwoByTwo, - FourByFour, - EightByEight + Grid2x2, + Grid4x4, + Grid8x8 } public enum ParticleFlipbookMode @@ -1087,6 +1096,12 @@ namespace RobloxFiles.Enums Plugin } + public enum SafeAreaCompatibility + { + None, + FullscreenExtension + } + public enum ScaleType { Stretch, @@ -1096,6 +1111,13 @@ namespace RobloxFiles.Enums Crop } + public enum ScreenInsets + { + None, + DeviceSafeInsets, + CoreUISafeInsets + } + public enum ScreenOrientation { LandscapeLeft, diff --git a/Plugins/.vscode/settings.json b/Plugins/.vscode/settings.json index 92dcd28..1f6e4e0 100644 --- a/Plugins/.vscode/settings.json +++ b/Plugins/.vscode/settings.json @@ -1,5 +1,6 @@ { - "Lua.diagnostics.ignore": [ - "CopyToClipboard" - ] + "[lua]": { + "editor.defaultFormatter": "JohnnyMorganz.stylua", + "editor.formatOnSave": true + } } \ No newline at end of file diff --git a/Plugins/GenerateApiDump.rbxm b/Plugins/GenerateApiDump.rbxm index 94b80c3..dad68dc 100644 Binary files a/Plugins/GenerateApiDump.rbxm and b/Plugins/GenerateApiDump.rbxm differ diff --git a/Plugins/GenerateApiDump/Formatting.lua b/Plugins/GenerateApiDump/Formatting.lua index 10ec4c2..a04c40e 100644 --- a/Plugins/GenerateApiDump/Formatting.lua +++ b/Plugins/GenerateApiDump/Formatting.lua @@ -1,19 +1,35 @@ --!strict local Format: Format = {} +local LegacyFonts = require(script.Parent.LegacyFonts) + +local Vector2_consts = table.freeze({ + [Vector2.one] = "Vector2.one", + [Vector2.zero] = "Vector2.zero", + [Vector2.xAxis] = "Vector2.xAxis", + [Vector2.yAxis] = "Vector2.yAxis", +}) + +local Vector3_consts = table.freeze({ + [Vector3.one] = "Vector3.one", + [Vector3.zero] = "Vector3.zero", + [Vector3.xAxis] = "Vector3.xAxis", + [Vector3.yAxis] = "Vector3.yAxis", + [Vector3.zAxis] = "Vector3.zAxis", +}) export type FormatFunc = (any) -> string export type Format = { [string]: FormatFunc } -export type IEnum = { GetEnumItems: (IEnum) -> {EnumItem} } +export type IEnum = { GetEnumItems: (IEnum) -> { EnumItem } } local function flags(flagType: any, enum: Enum): string local value = 0 - + for i, item: EnumItem in enum:GetEnumItems() do - if (flags :: any)[item.Name] then + if flagType[item.Name] then value += (2 ^ item.Value) end end - + return tostring(value) end @@ -25,7 +41,7 @@ function Format.Bytes(value: string): string if #value > 0 then return string.format("Convert.FromBase64String(%q)", value) end - + return "Array.Empty()" end @@ -38,9 +54,9 @@ function Format.String(value: string): string end function Format.Int(value: number): string - if value == 2^31-1 then + if value == 2 ^ 31 - 1 then return "int.MaxValue" - elseif value == -2^31 then + elseif value == -2 ^ 31 then return "int.MinValue" else return string.format("%i", value) @@ -49,20 +65,20 @@ end function Format.Number(value: number): string local int = math.floor(value) - + if math.abs(value - int) < 0.001 then return Format.Int(int) end - + local result = string.format("%.5f", value) result = result:gsub("%.?0+$", "") - + return result end function Format.Double(value: number): string local result = Format.Number(value) - + if result == "inf" then return "double.MaxValue" elseif result == "-inf" then @@ -74,16 +90,16 @@ end function Format.Float(value: number): string local result = Format.Number(value) - + if result == "inf" then return "float.MaxValue" elseif result == "-inf" then return "float.MinValue" else if result:find("%.") then - result = result .. 'f' + result = result .. "f" end - + return result end end @@ -98,7 +114,7 @@ end function Format.EnumItem(item: EnumItem): string local enum = tostring(item.EnumType) - return enum .. '.' .. item.Name + return enum .. "." .. item.Name end function Format.BrickColor(brickColor: BrickColor): string @@ -110,22 +126,22 @@ function Format.Color3(color: Color3): string if color == Color3.new() then return "new Color3()" end - + local r = Format.Float(color.R) local g = Format.Float(color.G) local b = Format.Float(color.B) - - local fmt = "%s(%s, %s, %s)"; - local constructor = "new Color3"; - - if string.find(r .. g .. b, 'f') then + + local fmt = "%s(%s, %s, %s)" + local constructor = "new Color3" + + if string.find(r .. g .. b, "f") then r = Format.Int(color.R * 255) g = Format.Int(color.G * 255) b = Format.Int(color.B * 255) - + constructor = "Color3.FromRGB" end - + return fmt:format(constructor, r, g, b) end @@ -133,10 +149,10 @@ function Format.UDim(udim: UDim): string if udim == UDim.new() then return "new UDim()" end - + local scale = Format.Float(udim.Scale) local offset = Format.Int(udim.Offset) - + local fmt = "new UDim(%s, %s)" return fmt:format(scale, offset) end @@ -145,62 +161,66 @@ function Format.UDim2(udim2: UDim2): string if udim2 == UDim2.new() then return "new UDim2()" end - + local xScale = Format.Float(udim2.X.Scale) local yScale = Format.Float(udim2.Y.Scale) - + local xOffset = Format.Int(udim2.X.Offset) local yOffset = Format.Int(udim2.Y.Offset) - + local fmt = "new UDim2(%s, %s, %s, %s)" return fmt:format(xScale, xOffset, yScale, yOffset) end function Format.Vector2(v2: Vector2): string - if v2 == Vector2.zero then - return "new Vector2()" + for const, str in Vector2_consts do + if v2 == const then + return str + end end - + local x = Format.Float(v2.X) local y = Format.Float(v2.Y) - + local fmt = "new Vector2(%s, %s)" return fmt:format(x, y) end function Format.Vector3(v3: Vector3): string - if v3 == Vector3.zero then - return "new Vector3()" + for const, str in Vector3_consts do + if v3 == const then + return str + end end - + local x = Format.Float(v3.X) local y = Format.Float(v3.Y) local z = Format.Float(v3.Z) - + local fmt = "new Vector3(%s, %s, %s)" return fmt:format(x, y, z) end function Format.CFrame(cf: CFrame): string if cf == CFrame.identity then - return "new CFrame()" + return "CFrame.identity" end - + if cf.Rotation == CFrame.identity then local x = Format.Float(cf.X) local y = Format.Float(cf.Y) local z = Format.Float(cf.Z) - + return string.format("new CFrame(%s, %s, %s)", x, y, z) else local comp = { cf:GetComponents() } local matrix = "" - + for i = 1, 12 do local sep = (if i > 1 then ", " else "") matrix ..= sep .. Format.Float(comp[i]) end - + return string.format("new CFrame(%s)", matrix) end end @@ -208,14 +228,14 @@ end function Format.NumberRange(nr: NumberRange): string local min = Format.Float(nr.Min) local max = Format.Float(nr.Max) - + local fmt = "new NumberRange(%s)" local value = min - + if min ~= max then value ..= ", " .. max end - + return fmt:format(value) end @@ -225,10 +245,10 @@ function Format.Ray(ray: Ray): string return "new Ray()" end end - + local origin = Format.Vector3(ray.Origin) local direction = Format.Vector3(ray.Direction) - + local fmt = "new Ray(%s, %s)" return fmt:format(origin, direction) end @@ -236,14 +256,14 @@ end function Format.Rect(rect: Rect): string local min: any = rect.Min local max: any = rect.Max - + if min == max and min == Vector2.zero then return "new Rect()" end - + min = Format.Vector2(min) max = Format.Vector2(max) - + local fmt = "new Rect(%s, %s)" return fmt:format(min, max) end @@ -251,7 +271,7 @@ end function Format.ColorSequence(cs: ColorSequence): string local csKey = cs.Keypoints[1] local value = tostring(csKey.Value) - + local fmt = "new ColorSequence(%s)" return fmt:format(value) end @@ -259,8 +279,8 @@ end function Format.NumberSequence(ns: NumberSequence): string local nsKey = ns.Keypoints[1] local fmt = "new NumberSequence(%s)" - - local value = Format.Float(nsKey.Value) + + local value = Format.Float(nsKey.Value) return fmt:format(value) end @@ -268,11 +288,11 @@ function Format.Vector3int16(v3: Vector3int16): string if v3 == Vector3int16.new() then return "new Vector3int16()" end - + local x = Format.Int(v3.X) local y = Format.Int(v3.Y) local z = Format.Int(v3.Z) - + local fmt = "new Vector3int16(%s, %s, %s)" return fmt:format(x, y, z) end @@ -283,12 +303,19 @@ function Format.SharedString(str: string): string end function Format.FontFace(font: Font): string + local legacyFont = LegacyFonts[tostring(font)] + + if legacyFont then + local fmt = "FontFace.FromEnum(Enums.Font.%s)" + return fmt:format(legacyFont.Name) + end + local family = string.format("%q", font.Family) local args = { family } - + local style = font.Style local weight = font.Weight - + if style ~= Enum.FontStyle.Normal then table.insert(args, "FontStyle." .. style.Name) end @@ -296,11 +323,11 @@ function Format.FontFace(font: Font): string if #args > 1 or weight ~= Enum.FontWeight.Regular then table.insert(args, "FontWeight." .. weight.Name) end - + local fmt = "new FontFace(%s)" local argStr = table.concat(args, ", ") - + return fmt:format(argStr) end -return Format \ No newline at end of file +return Format diff --git a/Plugins/GenerateApiDump/LegacyFonts.lua b/Plugins/GenerateApiDump/LegacyFonts.lua new file mode 100644 index 0000000..e953ef3 --- /dev/null +++ b/Plugins/GenerateApiDump/LegacyFonts.lua @@ -0,0 +1,14 @@ +--!strict + +local LegacyFonts = {} :: { + [string]: Enum.Font, +} + +for i, font: Enum.Font in Enum.Font:GetEnumItems() do + if font ~= Enum.Font.Unknown then + local fontFace = Font.fromEnum(font) + LegacyFonts[tostring(fontFace)] = font + end +end + +return table.freeze(LegacyFonts) diff --git a/Plugins/GenerateApiDump/PropertyPatches.lua b/Plugins/GenerateApiDump/PropertyPatches.lua index b7d4c24..1605357 100644 --- a/Plugins/GenerateApiDump/PropertyPatches.lua +++ b/Plugins/GenerateApiDump/PropertyPatches.lua @@ -1,19 +1,17 @@ --!strict local HttpService = game:GetService("HttpService") -export type GetSet = string | -{ - Get: string; - Set: string; - Flags: string?; +export type GetSet = string | { + Get: string, + Set: string, + Flags: string?, } -export type Patch = -{ - Add: { [string]: string }?; - Redirect: { [string]: GetSet }?; - Defaults: { [string]: any }?; - Remove: {string}?; +export type Patch = { + Add: { [string]: string }?, + Redirect: { [string]: GetSet }?, + Defaults: { [string]: any }?, + Remove: { string }?, } -- strict type reaffirmation? @@ -24,15 +22,14 @@ local function GetSet(getSet: GetSet): GetSet end local function UseColor3(propName: string): GetSet - return - { - Get = string.format("BrickColor.FromColor3(%s)", propName); - Set = propName .. " = value?.Color"; + return { + Get = string.format("BrickColor.FromColor3(%s)", propName), + Set = propName .. " = value?.Color", } end local function TryDefineEnum(enumName: string): string? - local gotEnum, enum = pcall(function () + local gotEnum, enum = pcall(function() return (Enum :: any)[enumName] :: Enum end) @@ -44,12 +41,12 @@ local function TryDefineEnum(enumName: string): string? end local function TryGetEnumItem(enumName, itemName): EnumItem? - local gotEnum, enum = pcall(function () + local gotEnum, enum = pcall(function() return (Enum :: any)[enumName] :: Enum end) - + if gotEnum then - local gotEnumItem, item = pcall(function () + local gotEnumItem, item = pcall(function() return (enum :: any)[itemName] :: EnumItem end) @@ -61,865 +58,743 @@ local function TryGetEnumItem(enumName, itemName): EnumItem? return nil end -local GuiTextMixIn: Patch = -{ - Add = { Transparency = "float" }; - - Redirect = - { - FontSize = GetSet - { - Get = "FontUtility.GetFontSize(TextSize)"; - Set = "TextSize = FontUtility.GetFontSize(value)"; - }; - - TextColor = UseColor3 "TextColor3"; - TextWrap = GetSet "TextWrapped"; - - Transparency = GetSet - { - Get = "base.Transparency"; - - Set = "base.Transparency = value;\n" .. - "TextTransparency = value;"; - - Flag = "new"; - } - }; +local GuiTextMixIn: Patch = { + Add = { Transparency = "float" }, + + Redirect = { + Font = GetSet({ + Get = "FontUtility.GetLegacyFont(FontFace)", + Set = "FontUtility.TryGetFontFace(value, out FontFace)", + }), + + FontSize = GetSet({ + Get = "FontUtility.GetFontSize(TextSize)", + Set = "TextSize = FontUtility.GetFontSize(value)", + }), + + TextColor = UseColor3("TextColor3"), + TextWrap = GetSet("TextWrapped"), + + Transparency = GetSet({ + Get = "base.Transparency", + Set = "base.Transparency = value;\nTextTransparency = value;", + Flag = "new", + }), + }, } ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -local PropertyPatches: { [string]: Patch } = -{ - AnimationRigData = - { - Add = - { - label = "BinaryString"; - name = "BinaryString"; - parent = "BinaryString"; - postTransform = "BinaryString"; - preTransform = "BinaryString"; - transform = "BinaryString"; - }; +local PropertyPatches: { [string]: Patch } = { + AnimationRigData = { + Add = { + name = "BinaryString", + label = "BinaryString", + parent = "BinaryString", + weight = "BinaryString", + transform = "BinaryString", + facsControl = "BinaryString", + preTransform = "BinaryString", + postTransform = "BinaryString", + articulatedJoint = "BinaryString", + endEffectorRotationConstraint = "BinaryString", + endEffectorTranslationConstraint = "BinaryString", + }, - Defaults = - { - label = "AQAAAAEAAAAAAAAA"; - name = "AQAAAAEAAAAAAAAA"; - parent = "AQAAAAEAAAAAAA=="; - postTransform = "AQAAAAEAAAAAAIA/AAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAAAAAAAAAAA="; - preTransform = "AQAAAAEAAAAAAIA/AAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAAAAAAAAAAA="; - transform = "AQAAAAEAAAAAAIA/AAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAAAAAAAAAAA="; - } - }; - - BallSocketConstraint = - { + Defaults = { + name = "AQAAAAEAAAAAAAAA", + label = "AQAAAAEAAAAAAAAA", + parent = "AQAAAAEAAAAAAA==", + + transform = "AQAAAAEAAAAAAIA/AAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAAAAAAAAAAA=", + preTransform = "AQAAAAEAAAAAAIA/AAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAAAAAAAAAAA=", + postTransform = "AQAAAAEAAAAAAIA/AAAAAAAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAgD8AAAAAAAAAAAAAAAA=", + + weight = "AQAAAAAAAAA=", + facsControl = "AQAAAAAAAAA=", + articulatedJoint = "AQAAAAAAAAA=", + endEffectorRotationConstraint = "AQAAAAAAAAA=", + endEffectorTranslationConstraint = "AQAAAAAAAAA=", + }, + }, + + BallSocketConstraint = { -- Why does this even exist? - Add = { MaxFrictionTorqueXml = "float" }; - }; - - BasePart = - { - Add = - { - MaterialVariantSerialized = "string"; - MaterialVariant = "string"; - Color3uint8 = "Color3uint8"; - size = "Vector3"; - }; - - Redirect = - { - Position = GetSet - { - Get = "CFrame.Position"; - Set = "CFrame = new CFrame(value) * CFrame.Rotation"; - }; + Add = { + MaxFrictionTorqueXml = "float", + MaxFrictionTorque = "float", + }, - MaterialVariant = GetSet "MaterialVariantSerialized"; - BrickColor = UseColor3 "Color"; - Color = GetSet "Color3uint8"; - Size = GetSet "size"; - }; - - Defaults = - { - Color3uint8 = Color3.fromRGB(163, 162, 165); - MaterialVariantSerialized = ""; - size = Vector3.new(4, 1.2, 2); - }; - }; - - BaseScript = - { - Remove = {"LinkedSource"}; - }; - - BevelMesh = - { - Add = - { - Bevel = "float"; - Bevel_Roundness = "float"; - Bulge = "float"; - } - }; - - BinaryStringValue = - { - Add = { Value = "BinaryString" }; - }; - - BodyColors = - { - Redirect = - { - HeadColor = UseColor3 "HeadColor3"; - LeftArmColor = UseColor3 "LeftArmColor3"; - RightArmColor = UseColor3 "RightArmColor3"; - LeftLegColor = UseColor3 "LeftLegColor3"; - RightLegColor = UseColor3 "RightLegColor3"; - TorsoColor = UseColor3 "TorsoColor3"; - } - }; - - BodyAngularVelocity = - { - Redirect = { angularvelocity = GetSet "AngularVelocity" }; - }; - - BodyGyro = - { - Redirect = { cframe = GetSet "CFrame" }; - }; - - Camera = - { - Redirect = { CoordinateFrame = GetSet "CFrame" } - }; - - CustomEvent = - { - Add = { PersistedCurrentValue = "float" }; - }; - - DataModelMesh = - { - Add = - { - LODX = TryDefineEnum("LevelOfDetailSetting"); - LODY = TryDefineEnum("LevelOfDetailSetting"); - }; - - Defaults = - { - LODX = TryGetEnumItem("LevelOfDetailSetting", "High"); - LODY = TryGetEnumItem("LevelOfDetailSetting", "High"); - }; - }; - - DataStoreService = - { - Defaults = - { - AutomaticRetry = true; - LegacyNamingScheme = false; - } - }; - - DoubleConstrainedValue = - { - Add = { value = "double" }; - - Redirect = - { - Value = GetSet "value"; - ConstrainedValue = GetSet "value"; - } - }; - - Fire = - { - Add = - { - heat_xml = "float"; - size_xml = "float"; - }; - - Defaults = - { - heat_xml = 9; - size_xml = 5; - }; - - Redirect = - { - Heat = GetSet "heat_xml"; - Size = GetSet "size_xml"; - }; - }; + Redirect = { + MaxFrictionTorque = GetSet("MaxFrictionTorqueXml"), + }, + }, - FloatCurve = - { - Add = { ValuesAndTimes = "BinaryString" }; - Defaults = { ValuesAndTimes = "AAAAAAEAAAAKAAAAAAAAFkUAAAAA" }; - }; - - FormFactorPart = - { - Add = - { - formFactorRaw = TryDefineEnum("FormFactor"); - }; - - Defaults = - { - formFactorRaw = TryGetEnumItem("FormFactor", "Brick"); - }; - - Redirect = - { - FormFactor = GetSet "formFactorRaw"; - }; - }; + BasePart = { + Add = { + MaterialVariantSerialized = "string", + MaterialVariant = "string", + Color3uint8 = "Color3uint8", + size = "Vector3", + }, - FunctionalTest = - { - Add = { HasMigratedSettingsToTestService = "bool"; }; - Defaults = { HasMigratedSettingsToTestService = false; }; - }; - - GuiBase2d = - { - Redirect = { Localize = GetSet "AutoLocalize" } - }; - - GuiBase3d = - { - Redirect = { Color = UseColor3 "Color3" } - }; - - GuiObject = - { - Redirect = - { - Transparency = GetSet "BackgroundTransparency"; - BackgroundColor = UseColor3 "BackgroundColor3"; - BorderColor = UseColor3 "BorderColor3"; - } - }; + Redirect = { + Position = GetSet({ + Get = "CFrame.Position", + Set = "CFrame = new CFrame(value) * CFrame.Rotation", + }), - HiddenSurfaceRemovalAsset = - { - Add = - { - HSRData = "BinaryString"; - HSRMeshIdData = "BinaryString"; - } - }; - - HttpService = - { - Defaults = { HttpEnabled = false } - }; - - Humanoid = - { - Add = - { - Health_XML = "float"; - InternalHeadScale = "float"; - InternalBodyScale = "Vector3"; - }; - - Defaults = - { - Health_XML = 100; - InternalHeadScale = 1; - InternalBodyScale = Vector3.new(1, 1, 1); - }; - - Redirect = - { - Health = GetSet "Health_XML"; - }; - - Remove = - { - "Jump"; - "Torso"; - "LeftLeg"; - "RightLeg"; - }; - }; - - HumanoidDescription = - { - Add = - { - EmotesDataInternal = "string"; - EquippedEmotesDataInternal = "string"; - }; + MaterialVariant = GetSet("MaterialVariantSerialized"), + BrickColor = UseColor3("Color"), + Color = GetSet("Color3uint8"), + Size = GetSet("size"), + }, - Defaults = - { - AccessoryBlob = "[]"; - EmotesDataInternal = "[]"; - EquippedEmotesDataInternal = "[]"; - } - }; - - InsertService = - { - Add = { AllowClientInsertModels = "bool" }; - Defaults = { AllowClientInsertModels = false }; - }; - - IntConstrainedValue = - { - Add = { value = "int64" }; - - Redirect = - { - Value = GetSet "value"; - ConstrainedValue = GetSet "value"; - } - }; - - Lighting = - { - Add = - { - Technology = TryDefineEnum("Technology"); - }; - - Defaults = - { - Technology = TryGetEnumItem("Technology", "Compatibility"); - }; - }; - - LocalizationTable = - { - Add = { Contents = "string" }; - Defaults = { Contents = "[]" }; - - Redirect = - { - DevelopmentLanguage = GetSet "SourceLocaleId"; - } - }; + Defaults = { + Color3uint8 = Color3.fromRGB(163, 162, 165), + MaterialVariantSerialized = "", + size = Vector3.new(4, 1.2, 2), + }, + }, - LocalScript = - { - Remove = - { + BaseScript = { + Remove = { "LinkedSource" }, + }, + + BevelMesh = { + Add = { + Bevel = "float", + Bevel_Roundness = "float", + Bulge = "float", + }, + }, + + BinaryStringValue = { + Add = { Value = "BinaryString" }, + }, + + BodyColors = { + Redirect = { + HeadColor = UseColor3("HeadColor3"), + LeftArmColor = UseColor3("LeftArmColor3"), + RightArmColor = UseColor3("RightArmColor3"), + LeftLegColor = UseColor3("LeftLegColor3"), + RightLegColor = UseColor3("RightLegColor3"), + TorsoColor = UseColor3("TorsoColor3"), + }, + }, + + BodyAngularVelocity = { + Redirect = { angularvelocity = GetSet("AngularVelocity") }, + }, + + BodyGyro = { + Redirect = { cframe = GetSet("CFrame") }, + }, + + Camera = { + Redirect = { CoordinateFrame = GetSet("CFrame") }, + }, + + CustomEvent = { + Add = { PersistedCurrentValue = "float" }, + }, + + DataModelMesh = { + Add = { + LODX = TryDefineEnum("LevelOfDetailSetting"), + LODY = TryDefineEnum("LevelOfDetailSetting"), + }, + + Defaults = { + LODX = TryGetEnumItem("LevelOfDetailSetting", "High"), + LODY = TryGetEnumItem("LevelOfDetailSetting", "High"), + }, + }, + + DataStoreService = { + Defaults = { + AutomaticRetry = true, + LegacyNamingScheme = false, + }, + }, + + DoubleConstrainedValue = { + Add = { value = "double" }, + + Redirect = { + Value = GetSet("value"), + ConstrainedValue = GetSet("value"), + }, + }, + + Fire = { + Add = { + heat_xml = "float", + size_xml = "float", + }, + + Defaults = { + heat_xml = 9, + size_xml = 5, + }, + + Redirect = { + Heat = GetSet("heat_xml"), + Size = GetSet("size_xml"), + }, + }, + + FloatCurve = { + Add = { ValuesAndTimes = "BinaryString" }, + Defaults = { ValuesAndTimes = "AAAAAAEAAAAKAAAAAAAAFkUAAAAA" }, + }, + + FormFactorPart = { + Add = { + formFactorRaw = TryDefineEnum("FormFactor"), + }, + + Defaults = { + formFactorRaw = TryGetEnumItem("FormFactor", "Brick"), + }, + + Redirect = { + FormFactor = GetSet("formFactorRaw"), + }, + }, + + FunctionalTest = { + Add = { HasMigratedSettingsToTestService = "bool" }, + Defaults = { HasMigratedSettingsToTestService = false }, + }, + + GuiBase2d = { + Redirect = { Localize = GetSet("AutoLocalize") }, + }, + + GuiBase3d = { + Redirect = { Color = UseColor3("Color3") }, + }, + + GuiObject = { + Redirect = { + Transparency = GetSet("BackgroundTransparency"), + BackgroundColor = UseColor3("BackgroundColor3"), + BorderColor = UseColor3("BorderColor3"), + }, + }, + + HiddenSurfaceRemovalAsset = { + Add = { + HSRData = "BinaryString", + HSRMeshIdData = "BinaryString", + }, + }, + + HttpService = { + Defaults = { HttpEnabled = false }, + }, + + Humanoid = { + Add = { + Health_XML = "float", + InternalHeadScale = "float", + InternalBodyScale = "Vector3", + }, + + Defaults = { + Health_XML = 100, + InternalHeadScale = 1, + InternalBodyScale = Vector3.new(1, 1, 1), + }, + + Redirect = { + Health = GetSet("Health_XML"), + }, + + Remove = { + "Jump", + "Torso", + "LeftLeg", + "RightLeg", + }, + }, + + HumanoidDescription = { + Add = { + EmotesDataInternal = "string", + EquippedEmotesDataInternal = "string", + }, + + Defaults = { + AccessoryBlob = "[]", + EmotesDataInternal = "[]", + EquippedEmotesDataInternal = "[]", + }, + }, + + InsertService = { + Add = { AllowClientInsertModels = "bool" }, + Defaults = { AllowClientInsertModels = false }, + }, + + IntConstrainedValue = { + Add = { value = "int64" }, + + Redirect = { + Value = GetSet("value"), + ConstrainedValue = GetSet("value"), + }, + }, + + Lighting = { + Add = { + Technology = TryDefineEnum("Technology"), + }, + + Defaults = { + Technology = TryGetEnumItem("Technology", "Compatibility"), + }, + }, + + LocalizationTable = { + Add = { Contents = "string" }, + Defaults = { Contents = "[]" }, + + Redirect = { + DevelopmentLanguage = GetSet("SourceLocaleId"), + }, + }, + + LocalScript = { + Remove = { "LinkedSource", - "Source" - } - }; - - LuaSourceContainer = - { - Add = - { - LinkedSource = "Content"; - ScriptGuid = "string"; - Source = "ProtectedString"; - }; - }; + "Source", + }, + }, - MarkerCurve = - { - Add = { ValuesAndTimes = "BinaryString" }; - Defaults = { ValuesAndTimes = "AAAAAAEAAAAKAAAAAAAAFkUAAAAA" }; - }; + LuaSourceContainer = { + Add = { + LinkedSource = "Content", + ScriptGuid = "string", + Source = "ProtectedString", + }, + }, - MaterialService = - { - Add = - { - Use2022Materials = "bool"; - Use2022MaterialsXml = "bool" - }; + MarkerCurve = { + Add = { ValuesAndTimes = "BinaryString" }, + Defaults = { ValuesAndTimes = "AAAAAAEAAAAKAAAAAAAAFkUAAAAA" }, + }, - Redirect = { Use2022Materials = GetSet "Use2022MaterialsXml" }; - - Defaults = - { - AsphaltName = "Asphalt"; - BasaltName = "Basalt"; - BrickName = "Brick"; - CobblestoneName = "Cobblestone"; - ConcreteName = "Concrete"; - CorrodedMetalName = "CorrodedMetal"; - CrackedLavaName = "CrackedLava"; - DiamondPlateName = "DiamondPlate"; - FabricName = "Fabric"; - FoilName = "Foil"; - GlacierName = "Glacier"; - GraniteName = "Granite"; - GrassName = "Grass"; - GroundName = "Ground"; - IceName = "Ice"; - LeafyGrassName = "LeafyGrass"; - LimestoneName = "Limestone"; - MarbleName = "Marble"; - MetalName = "Metal"; - MudName = "Mud"; - PavementName = "Pavement"; - PebbleName = "Pebble"; - PlasticName = "Plastic"; - RockName = "Rock"; - SaltName = "Salt"; - SandName = "Sand"; - SandstoneName = "Sandstone"; - SlateName = "Slate"; - SmoothPlasticName = "SmoothPlastic"; - SnowName = "Snow"; - WoodName = "Wood"; - WoodPlanksName = "WoodPlanks"; - } - }; + MaterialService = { + Add = { + Use2022Materials = "bool", + Use2022MaterialsXml = "bool", + }, - MaterialVariant = - { - Add = - { - TexturePack0 = "Content"; - TexturePack1 = "Content"; - } - }; - - MeshPart = - { - Add = { VertexCount = "int" }; - Defaults = { VertexCount = 0 }; - Redirect = { MeshID = GetSet "MeshId" } - }; - - Model = - { - Add = - { - ModelMeshCFrame = "CFrame"; - ModelMeshData = "SharedString"; - ModelMeshSize = "Vector3"; - NeedsPivotMigration = "bool"; - WorldPivotData = "Optional"; - }; - }; + Redirect = { Use2022Materials = GetSet("Use2022MaterialsXml") }, - ModuleScript = - { - Remove = - { + Defaults = { + AsphaltName = "Asphalt", + BasaltName = "Basalt", + BrickName = "Brick", + CobblestoneName = "Cobblestone", + ConcreteName = "Concrete", + CorrodedMetalName = "CorrodedMetal", + CrackedLavaName = "CrackedLava", + DiamondPlateName = "DiamondPlate", + FabricName = "Fabric", + FoilName = "Foil", + GlacierName = "Glacier", + GraniteName = "Granite", + GrassName = "Grass", + GroundName = "Ground", + IceName = "Ice", + LeafyGrassName = "LeafyGrass", + LimestoneName = "Limestone", + MarbleName = "Marble", + MetalName = "Metal", + MudName = "Mud", + PavementName = "Pavement", + PebbleName = "Pebble", + PlasticName = "Plastic", + RockName = "Rock", + SaltName = "Salt", + SandName = "Sand", + SandstoneName = "Sandstone", + SlateName = "Slate", + SmoothPlasticName = "SmoothPlastic", + SnowName = "Snow", + WoodName = "Wood", + WoodPlanksName = "WoodPlanks", + }, + }, + + MaterialVariant = { + Add = { + TexturePack0 = "Content", + TexturePack1 = "Content", + }, + }, + + MeshPart = { + Add = { VertexCount = "int" }, + Defaults = { VertexCount = 0 }, + Redirect = { MeshID = GetSet("MeshId") }, + }, + + Model = { + Add = { + ModelMeshCFrame = "CFrame", + ModelMeshData = "SharedString", + ModelMeshSize = "Vector3", + NeedsPivotMigration = "bool", + WorldPivotData = "Optional", + }, + }, + + ModuleScript = { + Remove = { "LinkedSource", - "Source" - } - }; - - PackageLink = - { - Add = - { - VersionIdSerialize = "int64"; - PackageIdSerialize = "Content"; - }; - - Defaults = { AutoUpdate = false }; - }; - - Part = - { - Add = { shape = TryDefineEnum("PartType") }; - Redirect = { Shape = GetSet "shape" }; - }; - - ParticleEmitter = - { - Redirect = - { - VelocitySpread = GetSet - { - Get = "SpreadAngle.X"; - Set = "SpreadAngle = new Vector2(value, value)"; - } - } - }; - - PartOperation = - { - Add = - { - AssetId = "Content"; + "Source", + }, + }, - ChildData = "BinaryString"; - ChildData2 = "SharedString"; + PackageLink = { + Add = { + VersionIdSerialize = "int64", + PackageIdSerialize = "Content", + }, - MeshData = "BinaryString"; - MeshData2 = "SharedString"; + Defaults = { AutoUpdate = false }, + }, - FormFactor = TryDefineEnum("FormFactor"); - }; - - Defaults = { FormFactor = Enum.FormFactor.Custom }; - }; - - PartOperationAsset = - { - Add = - { - ChildData = "BinaryString"; - MeshData = "BinaryString"; - }; - }; - - Players = - { - Defaults = { MaxPlayersInternal = 16 } - }; + Part = { + Add = { shape = TryDefineEnum("PartType") }, + Redirect = { Shape = GetSet("shape") }, + }, - PolicyService = - { - Add = - { - IsLuobuServer = TryDefineEnum("TriStateBoolean"); - LuobuWhitelisted = TryDefineEnum("TriStateBoolean"); - }; + ParticleEmitter = { + Redirect = { + VelocitySpread = GetSet({ + Get = "SpreadAngle.X", + Set = "SpreadAngle = new Vector2(value, value)", + }), + }, + }, - Defaults = - { - IsLuobuServer = TryGetEnumItem("TriStateBoolean", "Unknown"); - LuobuWhitelisted = TryGetEnumItem("TriStateBoolean", "Unknown"); - }; - }; + PartOperation = { + Add = { + AssetId = "Content", - RotationCurve = - { - Add = { ValuesAndTimes = "BinaryString" }; - Defaults = { ValuesAndTimes = "AAAAAAEAAAAKAAAAAAAAFkUAAAAA" }; - }; - - SelectionBox = - { - Redirect = { SurfaceColor = UseColor3 "SurfaceColor3" } - }; - - SelectionSphere = - { - Redirect = { SurfaceColor = UseColor3 "SurfaceColor3" } - }; - - ServerScriptService = - { - Defaults = { LoadStringEnabled = false } - }; + ChildData = "BinaryString", + ChildData2 = "SharedString", - Script = - { - Remove = - { + MeshData = "BinaryString", + MeshData2 = "SharedString", + + FormFactor = TryDefineEnum("FormFactor"), + }, + + Defaults = { FormFactor = Enum.FormFactor.Custom }, + }, + + PartOperationAsset = { + Add = { + ChildData = "BinaryString", + MeshData = "BinaryString", + }, + }, + + Players = { + Defaults = { MaxPlayersInternal = 16 }, + }, + + PolicyService = { + Add = { + IsLuobuServer = TryDefineEnum("TriStateBoolean"), + LuobuWhitelisted = TryDefineEnum("TriStateBoolean"), + }, + + Defaults = { + IsLuobuServer = TryGetEnumItem("TriStateBoolean", "Unknown"), + LuobuWhitelisted = TryGetEnumItem("TriStateBoolean", "Unknown"), + }, + }, + + RotationCurve = { + Add = { ValuesAndTimes = "BinaryString" }, + Defaults = { ValuesAndTimes = "AAAAAAEAAAAKAAAAAAAAFkUAAAAA" }, + }, + + SelectionBox = { + Redirect = { SurfaceColor = UseColor3("SurfaceColor3") }, + }, + + SelectionSphere = { + Redirect = { SurfaceColor = UseColor3("SurfaceColor3") }, + }, + + ServerScriptService = { + Defaults = { LoadStringEnabled = false }, + }, + + Script = { + Remove = { "LinkedSource", - "Source" - } - }; - - ScriptDebugger = - { - Add = - { - CoreScriptIdentifier = "string"; - ScriptGuid = "string"; - } - }; - - Smoke = - { - Add = - { - size_xml = "float"; - opacity_xml = "float"; - riseVelocity_xml = "float"; - }; - - Defaults = - { - size_xml = 1; - opacity_xml = 0.5; - riseVelocity_xml = 1; - }; - - Redirect = - { - Size = GetSet "size_xml"; - Opacity = GetSet "opacity_xml"; - RiseVelocity = GetSet "riseVelocity_xml"; - }; - }; - - Sound = - { - Add = - { - MaxDistance = "float"; -- ?! - xmlRead_MaxDistance_3 = "float"; - xmlRead_MinDistance_3 = "float"; - }; - - Defaults = - { - xmlRead_MinDistance_3 = 10; - xmlRead_MaxDistance_3 = 10000; - }; - - Redirect = - { - MaxDistance = GetSet "xmlRead_MaxDistance_3"; - xmlRead_MinDistance_3 = GetSet "EmitterSize"; - RollOffMinDistance = GetSet "EmitterSize"; - MinDistance = GetSet "EmitterSize"; - Pitch = GetSet "PlaybackSpeed"; - }; - }; - - Sparkles = - { - Redirect = { Color = GetSet "SparkleColor" }; - }; + "Source", + }, + }, - StarterPlayer = - { - Add = - { - LoadCharacterLayeredClothing = "Enum:LoadCharacterLayeredClothing"; - }; + ScriptDebugger = { + Add = { + CoreScriptIdentifier = "string", + ScriptGuid = "string", + }, + }, - Defaults = - { - GameSettingsAvatar = Enum.GameAvatarType.R15; - GameSettingsR15Collision = Enum.R15CollisionType.OuterBox; - LoadCharacterLayeredClothing = Enum.LoadCharacterLayeredClothing.Default; - - GameSettingsScaleRangeHead = NumberRange.new(0.95, 1.00); - GameSettingsScaleRangeWidth = NumberRange.new(0.70, 1.00); - GameSettingsScaleRangeHeight = NumberRange.new(0.90, 1.05); - GameSettingsScaleRangeBodyType = NumberRange.new(0.00, 1.00); - GameSettingsScaleRangeProportion = NumberRange.new(0.00, 1.00); - }; - }; - - StudioData = - { - Add = - { - CommitInflightGuid = "string"; - CommitInflightAuthorId = "int64"; - CommitInflightPlaceVersion = "int"; - }; - }; - - SurfaceAppearance = - { - Defaults = { AlphaMode = Enum.AlphaMode.Overlay } - }; - - TextBox = GuiTextMixIn; - TextLabel = GuiTextMixIn; - TextButton = GuiTextMixIn; - - Terrain = - { - Add = - { - AcquisitionMethod = TryDefineEnum("TerrainAcquisitionMethod"); - ClusterGridV3 = "BinaryString"; - PhysicsGrid = "BinaryString"; - SmoothGrid = "BinaryString"; - }; - - Defaults = - { - Decoration = false; - SmoothGrid = "AQU="; - PhysicsGrid = "AgMAAAAAAAAAAAAAAAA="; - AcquisitionMethod = TryGetEnumItem("TerrainAcquisitionMethod", "None"); - MaterialColors = "AAAAAAAAan8/P39rf2Y/ilY+j35fi21PZmxvZbDqw8faiVpHOi4kHh4lZlw76JxKc3trhHtagcLgc4RKxr21zq2UlJSM"; - }; - }; + Smoke = { + Add = { + size_xml = "float", + opacity_xml = "float", + riseVelocity_xml = "float", + }, - TerrainDetail = - { - Add = { TexturePack1 = "Content"; } - }; - - TerrainRegion = - { - Add = - { - ExtentsMax = "Vector3int16"; - ExtentsMin = "Vector3int16"; - - GridV3 = "BinaryString"; - SmoothGrid = "BinaryString"; - }; - - Defaults = - { - ExtentsMax = Vector3int16.new(); - ExtentsMin = Vector3int16.new(); - - GridV3 = ""; - SmoothGrid = "AQU="; - }; - }; + Defaults = { + size_xml = 1, + opacity_xml = 0.5, + riseVelocity_xml = 1, + }, - TextChatService = - { - Defaults = - { - CreateDefaultCommands = true; - CreateDefaultTextChannels = true; - } - }; - - TriangleMeshPart = - { - Add = - { - InitialSize = "Vector3"; - LODData = "BinaryString"; - PhysicsData = "BinaryString"; - PhysicalConfigData = "SharedString"; - }; - - Defaults = - { - InitialSize = Vector3.new(1, 1, 1); - PhysicalConfigData = "1B2M2Y8AsgTpgAmY7PhCfg=="; - }; - }; - - TrussPart = - { - Add = { style = TryDefineEnum("Style") }; - Redirect = { Style = GetSet "style" }; - }; + Redirect = { + Size = GetSet("size_xml"), + Opacity = GetSet("opacity_xml"), + RiseVelocity = GetSet("riseVelocity_xml"), + }, + }, - UnvalidatedAssetService = - { - Add = { CachedData = "string" }; + Sound = { + Add = { + MaxDistance = "float", -- ?! + xmlRead_MaxDistance_3 = "float", + xmlRead_MinDistance_3 = "float", + }, - Defaults = - { - CachedData = HttpService:JSONEncode - { - users = {}; - lastSaveTime = 0; - lastKnownPublishRequest = 0; - } - } - }; + Defaults = { + xmlRead_MinDistance_3 = 10, + xmlRead_MaxDistance_3 = 10000, + }, - UserInputService = - { - Add = { LegacyInputEventsEnabled = "bool" }; - Defaults = { LegacyInputEventsEnabled = true }; - }; - - ViewportFrame = - { - Add = - { - CameraCFrame = "CFrame"; - CameraFieldOfView = "float"; - }; - - Defaults = - { - CameraCFrame = CFrame.new(); - CameraFieldOfView = 70; - }; - }; - - WeldConstraint = - { - Add = - { - Part0Internal = "Class:BasePart"; - Part1Internal = "Class:BasePart"; + Redirect = { + MaxDistance = GetSet("xmlRead_MaxDistance_3"), + xmlRead_MinDistance_3 = GetSet("EmitterSize"), + RollOffMinDistance = GetSet("EmitterSize"), + MinDistance = GetSet("EmitterSize"), + Pitch = GetSet("PlaybackSpeed"), + }, + }, - EnabledInternal = "bool"; - State = "int"; + Sparkles = { + Redirect = { Color = GetSet("SparkleColor") }, + }, - CFrame0 = "CFrame"; - CFrame1 = "CFrame"; - }; - - Defaults = - { - CFrame0 = CFrame.new(); - CFrame1 = CFrame.new(); + StarterPlayer = { + Add = { + LoadCharacterLayeredClothing = "Enum:LoadCharacterLayeredClothing", + }, - EnabledInternal = true; - State = 3; - - Part0 = Instance.new("Part"); - Part1 = Instance.new("Part"); - }; - - Redirect = - { - Part0 = GetSet "Part0Internal"; - Part1 = GetSet "Part1Internal"; - Enabled = GetSet "EnabledInternal"; - }; - }; - - Workspace = - { - Add = - { - CollisionGroups = "string"; + Defaults = { + GameSettingsAvatar = Enum.GameAvatarType.R15, + GameSettingsR15Collision = Enum.R15CollisionType.OuterBox, + LoadCharacterLayeredClothing = Enum.LoadCharacterLayeredClothing.Default, - ExplicitAutoJoints = "bool"; - TerrainWeldsFixed = "bool"; + GameSettingsScaleRangeHead = NumberRange.new(0.95, 1.00), + GameSettingsScaleRangeWidth = NumberRange.new(0.70, 1.00), + GameSettingsScaleRangeHeight = NumberRange.new(0.90, 1.05), + GameSettingsScaleRangeBodyType = NumberRange.new(0.00, 1.00), + GameSettingsScaleRangeProportion = NumberRange.new(0.00, 1.00), + }, + }, - StreamingMinRadius = "int"; - StreamingTargetRadius = "int"; + StudioData = { + Add = { + CommitInflightGuid = "string", + CommitInflightAuthorId = "int64", + CommitInflightPlaceVersion = "int", + }, + }, - MeshPartHeads = TryDefineEnum("MeshPartHeads"); - SignalBehavior = TryDefineEnum("SignalBehavior"); - StreamingPauseMode = TryDefineEnum("StreamingPauseMode"); - PhysicsSteppingMethod = TryDefineEnum("PhysicsSteppingMethod"); - MeshPartHeadsAndAccessories = TryDefineEnum("MeshPartHeadsAndAccessories"); - }; - - Defaults = - { - CollisionGroups = "Default^0^1"; + SurfaceAppearance = { + Defaults = { AlphaMode = Enum.AlphaMode.Overlay }, + }, - TouchesUseCollisionGroups = false; - ExplicitAutoJoints = true; - TerrainWeldsFixed = true; - - StreamingMinRadius = 64; - StreamingTargetRadius = 1024; + TextBox = GuiTextMixIn, + TextLabel = GuiTextMixIn, + TextButton = GuiTextMixIn, - MeshPartHeads = TryGetEnumItem("MeshPartHeads", "Default"); - SignalBehavior = TryGetEnumItem("SignalBehavior", "Default"); - StreamingPauseMode = TryGetEnumItem("StreamingPauseMode", "Default"); - PhysicsSteppingMethod = TryGetEnumItem("PhysicsSteppingMethod", "Default"); - MeshPartHeadsAndAccessories = TryGetEnumItem("MeshPartHeadsAndAccessories", "Default"); - } - } + Terrain = { + Add = { + AcquisitionMethod = TryDefineEnum("TerrainAcquisitionMethod"), + ClusterGridV3 = "BinaryString", + PhysicsGrid = "BinaryString", + SmoothGrid = "BinaryString", + }, + + Defaults = { + Decoration = false, + SmoothGrid = "AQU=", + PhysicsGrid = "AgMAAAAAAAAAAAAAAAA=", + AcquisitionMethod = TryGetEnumItem("TerrainAcquisitionMethod", "None"), + MaterialColors = "AAAAAAAAan8/P39rf2Y/ilY+j35fi21PZmxvZbDqw8faiVpHOi4kHh4lZlw76JxKc3trhHtagcLgc4RKxr21zq2UlJSM", + }, + }, + + TerrainDetail = { + Add = { TexturePack = "Content" }, + }, + + TerrainRegion = { + Add = { + ExtentsMax = "Vector3int16", + ExtentsMin = "Vector3int16", + + GridV3 = "BinaryString", + SmoothGrid = "BinaryString", + }, + + Defaults = { + ExtentsMax = Vector3int16.new(), + ExtentsMin = Vector3int16.new(), + + GridV3 = "", + SmoothGrid = "AQU=", + }, + }, + + TextChatService = { + Defaults = { + CreateDefaultCommands = true, + CreateDefaultTextChannels = true, + }, + }, + + TriangleMeshPart = { + Add = { + InitialSize = "Vector3", + LODData = "BinaryString", + PhysicsData = "BinaryString", + PhysicalConfigData = "SharedString", + }, + + Defaults = { + InitialSize = Vector3.new(1, 1, 1), + PhysicalConfigData = "1B2M2Y8AsgTpgAmY7PhCfg==", + }, + }, + + TrussPart = { + Add = { style = TryDefineEnum("Style") }, + Redirect = { Style = GetSet("style") }, + }, + + UnvalidatedAssetService = { + Add = { CachedData = "string" }, + + Defaults = { + CachedData = HttpService:JSONEncode({ + users = {}, + lastSaveTime = 0, + lastKnownPublishRequest = 0, + }), + }, + }, + + UserInputService = { + Add = { LegacyInputEventsEnabled = "bool" }, + Defaults = { LegacyInputEventsEnabled = true }, + }, + + ViewportFrame = { + Add = { + CameraCFrame = "CFrame", + CameraFieldOfView = "float", + }, + + Defaults = { + CameraCFrame = CFrame.new(), + CameraFieldOfView = 70, + }, + }, + + WeldConstraint = { + Add = { + Part0Internal = "Class:BasePart", + Part1Internal = "Class:BasePart", + + EnabledInternal = "bool", + State = "int", + + CFrame0 = "CFrame", + CFrame1 = "CFrame", + }, + + Defaults = { + CFrame0 = CFrame.new(), + CFrame1 = CFrame.new(), + + EnabledInternal = true, + State = 3, + + Part0 = Instance.new("Part"), + Part1 = Instance.new("Part"), + }, + + Redirect = { + Part0 = GetSet("Part0Internal"), + Part1 = GetSet("Part1Internal"), + Enabled = GetSet("EnabledInternal"), + }, + }, + + Workspace = { + Add = { + CollisionGroups = "string", + + ExplicitAutoJoints = "bool", + TerrainWeldsFixed = "bool", + + StreamingMinRadius = "int", + StreamingTargetRadius = "int", + + MeshPartHeads = TryDefineEnum("MeshPartHeads"), + SignalBehavior = TryDefineEnum("SignalBehavior"), + StreamingPauseMode = TryDefineEnum("StreamingPauseMode"), + PhysicsSteppingMethod = TryDefineEnum("PhysicsSteppingMethod"), + MeshPartHeadsAndAccessories = TryDefineEnum("MeshPartHeadsAndAccessories"), + }, + + Defaults = { + CollisionGroups = "Default^0^1", + + TouchesUseCollisionGroups = false, + ExplicitAutoJoints = true, + TerrainWeldsFixed = true, + + StreamingMinRadius = 64, + StreamingTargetRadius = 1024, + + MeshPartHeads = TryGetEnumItem("MeshPartHeads", "Default"), + SignalBehavior = TryGetEnumItem("SignalBehavior", "Default"), + StreamingPauseMode = TryGetEnumItem("StreamingPauseMode", "Default"), + PhysicsSteppingMethod = TryGetEnumItem("PhysicsSteppingMethod", "Default"), + MeshPartHeadsAndAccessories = TryGetEnumItem("MeshPartHeadsAndAccessories", "Default"), + }, + }, } ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ return PropertyPatches ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- \ No newline at end of file +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ diff --git a/Plugins/GenerateApiDump/init.server.lua b/Plugins/GenerateApiDump/init.server.lua index ac7f796..27fb13b 100644 --- a/Plugins/GenerateApiDump/init.server.lua +++ b/Plugins/GenerateApiDump/init.server.lua @@ -182,8 +182,7 @@ local function createProperty(propName, propType) name = data[2] end - return -{ + return { Name = propName, Serialization = { @@ -302,6 +301,7 @@ local function generateClasses() local enumMap = { Axis = true, + Font = true, FontSize = true, FontStyle = true, FontWeight = true, @@ -389,6 +389,8 @@ local function generateClasses() if not classTags.Service then return tostring(object) end + + return nil end) if not noSecurityCheck then @@ -519,6 +521,10 @@ local function generateClasses() table.sort(diffNames) for i, name in ipairs(diffNames) do + if redirectProps[name] then + continue + end + local value = diffProps[name] local valueType = typeof(value) local formatFunc = getFormatFunction(valueType) @@ -671,7 +677,7 @@ local function generateClasses() end) end elseif category == "Enum" then - local enum = Enum[valueType] + local enum = (Enum :: any)[valueType] local lowestId = math.huge local lowest diff --git a/Plugins/sourcemap.json b/Plugins/sourcemap.json index 4566f30..2621676 100644 --- a/Plugins/sourcemap.json +++ b/Plugins/sourcemap.json @@ -1 +1 @@ -{"name":"GenerateApiDump","className":"Script","filePaths":["GenerateApiDump\\init.server.lua","default.project.json"],"children":[{"name":"Formatting","className":"ModuleScript","filePaths":["GenerateApiDump\\Formatting.lua"]},{"name":"PropertyPatches","className":"ModuleScript","filePaths":["GenerateApiDump\\PropertyPatches.lua"]}]} \ No newline at end of file +{"name":"GenerateApiDump","className":"Script","filePaths":["GenerateApiDump\\init.server.lua","default.project.json"],"children":[{"name":"Formatting","className":"ModuleScript","filePaths":["GenerateApiDump\\Formatting.lua"]},{"name":"LegacyFonts","className":"ModuleScript","filePaths":["GenerateApiDump\\LegacyFonts.lua"]},{"name":"PropertyPatches","className":"ModuleScript","filePaths":["GenerateApiDump\\PropertyPatches.lua"]}]} \ No newline at end of file diff --git a/RobloxFileFormat.csproj b/RobloxFileFormat.csproj index 83d7457..80c6c40 100644 --- a/RobloxFileFormat.csproj +++ b/RobloxFileFormat.csproj @@ -43,18 +43,37 @@ packages\lz4net.1.0.15.93\lib\net4-client\LZ4.dll + + packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + + + packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + + packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + + packages\ZstdSharp.Port.0.6.5\lib\net461\ZstdSharp.dll + diff --git a/RobloxFileFormat.dll b/RobloxFileFormat.dll index b15f49b..173cd57 100644 Binary files a/RobloxFileFormat.dll and b/RobloxFileFormat.dll differ diff --git a/Tokens/Font.cs b/Tokens/Font.cs index c17e80d..fcd392f 100644 --- a/Tokens/Font.cs +++ b/Tokens/Font.cs @@ -24,7 +24,10 @@ namespace RobloxFiles.Tokens var styleNode = node["Style"]; Enum.TryParse(styleNode.InnerText, out FontStyle style); - prop.Value = new FontFace(family, weight, style); + var cachedFaceNode = node["CachedFaceId"]; + var cachedFaceId = cachedFaceNode?.InnerText; + + prop.Value = new FontFace(family, weight, style, cachedFaceId); return true; } catch @@ -77,13 +80,14 @@ namespace RobloxFiles.Tokens var style = (byte)value.Style; var family = value.Family; - var writer = attribute.Writer; + var cachedFaceId = value.CachedFaceId; + var writer = attribute.Writer; writer.Write(weight); writer.Write(style); attribute.WriteString(family); - attribute.WriteInt(0); // Reserved + attribute.WriteString(cachedFaceId); } } } diff --git a/Utility/FontUtility.cs b/Utility/FontUtility.cs index 0921e6c..f365c35 100644 --- a/Utility/FontUtility.cs +++ b/Utility/FontUtility.cs @@ -109,7 +109,7 @@ namespace RobloxFiles.Utility return value; } - public static Font GetFont(FontFace face) + public static Font GetLegacyFont(FontFace face) { var result = Font.Unknown; @@ -122,5 +122,10 @@ namespace RobloxFiles.Utility return result; } + + public static bool TryGetFontFace(Font font, out FontFace face) + { + return FontFaces.TryGetValue(font, out face); + } } } diff --git a/packages.config b/packages.config index 39dd594..ab47189 100644 --- a/packages.config +++ b/packages.config @@ -4,5 +4,11 @@ + + + + + + \ No newline at end of file