diff --git a/scripts/dumpRobloxTypes.py b/scripts/dumpRobloxTypes.py index 043c3925..7cb4f118 100644 --- a/scripts/dumpRobloxTypes.py +++ b/scripts/dumpRobloxTypes.py @@ -47,6 +47,7 @@ "BlockMesh", # its superclass is marked as deprecated but it isn't, so its broken "Enum", # redefined explicitly "EnumItem", # redefined explicitly + "GlobalSettings", # redefined explicitly ] # These classes are deferred to the very end of the dump, so that they have access to all the types @@ -56,7 +57,6 @@ "DataModel", "GenericSettings", "AnalysticsSettings", - "GlobalSettings", "UserSettings", # Plugin is deferred after its items are declared "Plugin", @@ -95,6 +95,7 @@ ], "Players": ["GetPlayers"], "ContextActionService": ["BindAction", "BindActionAtPriority"], + "WorldRoot": ["Raycast"], } # Extra members to add in to classes, commonly used to add in metamethods, and add corrections @@ -144,7 +145,8 @@ "function __mul(self, other: Vector3): Vector3", ], "UserSettings": [ - 'function GetService(self, service: "UserGameSettings"): UserGameSettings' + "GameSettings: UserGameSettings", + 'function GetService(self, service: "UserGameSettings"): UserGameSettings', ], "Instance": [ "Parent: Instance?", @@ -186,6 +188,9 @@ "PluginToolbar": [ "function CreateButton(self, id: string, toolTip: string, iconAsset: string, text: string?): PluginToolbarButton", ], + "WorldRoot": [ + "function Raycast(self, origin: Vector3, direction: Vector3, raycastParams: RaycastParams?): RaycastResult?" + ], } # Hardcoded types @@ -252,6 +257,18 @@ # More hardcoded types, but go at the end of the file # Useful if they rely on previously defined types END_BASE = """ +declare class GlobalSettings extends GenericSettings + Lua: LuaSettings + Game: GameSettings + Studio: Studio + Network: NetworkSettings + Physics: PhysicsSettings + Rendering: RenderSettings + Diagnostics: DebugSettings + function GetFFlag(self, name: string): boolean + function GetFVariable(self, name: string): string +end + declare game: DataModel declare workspace: Workspace declare plugin: Plugin diff --git a/scripts/globalTypes.d.lua b/scripts/globalTypes.d.lua index be0eaef9..f3072a9c 100644 --- a/scripts/globalTypes.d.lua +++ b/scripts/globalTypes.d.lua @@ -4005,7 +4005,6 @@ type ServiceProvider = any type DataModel = any type GenericSettings = any type AnalysticsSettings = any -type GlobalSettings = any type UserSettings = any type SessionService = any type Sky = any @@ -7363,8 +7362,8 @@ declare class WorldRoot extends Model function GetPartBoundsInRadius(self, position: Vector3, radius: number, overlapParams: OverlapParams?): { Instance } function GetPartsInPart(self, part: BasePart, overlapParams: OverlapParams?): { Instance } function IKMoveTo(self, part: BasePart, target: CFrame, translateStiffness: number?, rotateStiffness: number?, collisionsMode: EnumIKCollisionsMode?): nil - function Raycast(self, origin: Vector3, direction: Vector3, raycastParams: RaycastParams?): RaycastResult function SetInsertPoint(self, point: Vector3, ignoreGrid: boolean?): nil + function Raycast(self, origin: Vector3, direction: Vector3, raycastParams: RaycastParams?): RaycastResult? end declare class Workspace extends WorldRoot @@ -9737,14 +9736,10 @@ end declare class AnalysticsSettings extends GenericSettings end -declare class GlobalSettings extends GenericSettings - function GetFFlag(self, name: string): boolean - function GetFVariable(self, name: string): string -end - declare class UserSettings extends GenericSettings function IsUserFeatureEnabled(self, name: string): boolean function Reset(self): nil + GameSettings: UserGameSettings function GetService(self, service: "UserGameSettings"): UserGameSettings end @@ -9967,6 +9962,18 @@ declare Font: { } +declare class GlobalSettings extends GenericSettings + Lua: LuaSettings + Game: GameSettings + Studio: Studio + Network: NetworkSettings + Physics: PhysicsSettings + Rendering: RenderSettings + Diagnostics: DebugSettings + function GetFFlag(self, name: string): boolean + function GetFVariable(self, name: string): string +end + declare game: DataModel declare workspace: Workspace declare plugin: Plugin