From fb57af279714efe0b9090021cd48aff9833c7ce8 Mon Sep 17 00:00:00 2001 From: Stephen <93400341+StephenMCode@users.noreply.github.com> Date: Mon, 28 Sep 2026 04:03:06 -0700 Subject: [PATCH 1/2] fix: rename three `Instances` keys added in #92 (#93) `SufaceGui` is a misspelling of `SurfaceGui`, and `ColorValue` and `VectorValue` are not Roblox classes: the value objects are `Color3Value` and `Vector3Value`. Under the new solver the real names were type errors and the wrong ones type-checked and then threw at runtime. Type table only; nothing changes at runtime. --- src/create.luau | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/create.luau b/src/create.luau index bb0bc85..61707b4 100644 --- a/src/create.luau +++ b/src/create.luau @@ -59,7 +59,7 @@ export type Instances = { -- layer collectors ScreenGui: ScreenGui, - SufaceGui: SurfaceGui, + SurfaceGui: SurfaceGui, BillboardGui: BillboardGui, -- ui objects @@ -107,8 +107,8 @@ export type Instances = { NumberValue: NumberValue, StringValue: StringValue, ObjectValue: ObjectValue, - ColorValue: Color3Value, - VectorValue: Vector3Value, + Color3Value: Color3Value, + Vector3Value: Vector3Value, CFrameValue: CFrameValue, } From b010497a01611762dbfb2f4c48297f6d65cc8a28 Mon Sep 17 00:00:00 2001 From: es9 <28225662+es9-dev@users.noreply.github.com> Date: Mon, 28 Sep 2026 04:06:43 -0700 Subject: [PATCH 2/2] fix: guard globals on themselves rather than on `game` (#89) --- src/apply.luau | 2 +- src/cleanup.luau | 2 +- src/create.luau | 4 ++-- src/defaults.luau | 4 ++-- src/lib.luau | 12 ++++++------ 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/apply.luau b/src/apply.luau index c05fedf..f8755f5 100644 --- a/src/apply.luau +++ b/src/apply.luau @@ -1,4 +1,4 @@ -local typeof = game and typeof or require "../test/mock".typeof :: never +local typeof = Instance and typeof or require "../test/mock".typeof :: never local flags = require "./flags" local implicit_effect = require "./implicit_effect" diff --git a/src/cleanup.luau b/src/cleanup.luau index 6c46bbf..376fdd4 100644 --- a/src/cleanup.luau +++ b/src/cleanup.luau @@ -1,4 +1,4 @@ -local typeof = game and typeof or require "../test/mock".typeof :: never +local typeof = Instance and typeof or require "../test/mock".typeof :: never local graph = require "./graph" local get_scope = graph.get_scope diff --git a/src/create.luau b/src/create.luau index 61707b4..94adde1 100644 --- a/src/create.luau +++ b/src/create.luau @@ -1,5 +1,5 @@ -local typeof = game and typeof or require "../test/mock".typeof :: never -local Instance = game and Instance or require "../test/mock".Instance :: never +local typeof = Instance and typeof or require "../test/mock".typeof :: never +local Instance = Instance or require "../test/mock".Instance :: never local defaults = require "./defaults" local apply = require "./apply" diff --git a/src/defaults.luau b/src/defaults.luau index 77040ff..f268a3f 100644 --- a/src/defaults.luau +++ b/src/defaults.luau @@ -1,5 +1,5 @@ -local Enum = game and Enum or require "../test/mock".Enum :: never -local Color3 = game and Color3 or require "../test/mock".Color3 :: never +local Enum = Enum or require "../test/mock".Enum :: never +local Color3 = Color3 or require "../test/mock".Color3 :: never return { Part = { diff --git a/src/lib.luau b/src/lib.luau index a8a3885..99fbd7a 100644 --- a/src/lib.luau +++ b/src/lib.luau @@ -31,17 +31,17 @@ export type Instances = create.Instances export type Properties = create.Properties local function step(dt: number) - if game then debug.profilebegin("VIDE STEP") end + if debug.profilebegin then debug.profilebegin("VIDE STEP") end - if game then debug.profilebegin("VIDE SPRING") end + if debug.profilebegin then debug.profilebegin("VIDE SPRING") end update_springs(dt) - if game then debug.profileend() end + if debug.profileend then debug.profileend() end - if game then debug.profilebegin("VIDE SCHEDULER") end + if debug.profilebegin then debug.profilebegin("VIDE SCHEDULER") end update_timeouts(dt) - if game then debug.profileend() end + if debug.profileend then debug.profileend() end - if game then debug.profileend() end + if debug.profileend then debug.profileend() end end local stepped = game and game:GetService("RunService").Heartbeat:Connect(function(dt: number)