diff --git a/src/lua/framework/Vendor/Controllers/init.luau b/src/lua/framework/Vendor/Controllers/init.luau index c246b254..9ca77b12 100644 --- a/src/lua/framework/Vendor/Controllers/init.luau +++ b/src/lua/framework/Vendor/Controllers/init.luau @@ -1,13 +1,5 @@ -local Controllers = { } local Vendor = script.Parent.Vendor - --- // Variables - -Controllers.SignalController = require(Vendor.SignalController.Init) -Controllers.NetworkController = require(Vendor.NetworkController.Init) - --- // Functions - --- // Actions - -return Controllers \ No newline at end of file +return { + SignalController = require(Vendor.SignalController.Init), + NetworkController = require(Vendor.NetworkController.Init), +} \ No newline at end of file diff --git a/src/lua/framework/Vendor/Debugger.luau b/src/lua/framework/Vendor/Debugger.luau index 8942d1d3..2e070d9e 100644 --- a/src/lua/framework/Vendor/Debugger.luau +++ b/src/lua/framework/Vendor/Debugger.luau @@ -80,16 +80,7 @@ function EngineDebugger.Debug(debugHandler: (...any) -> (), arguments: {any} | a table.insert(EngineDebugger.CachedDebugCalls, arguments) - if not respectDebugger then - if type(arguments) == "table" then - debugHandler(prefix, table.unpack(arguments)) - else - debugHandler(`{prefix} {arguments}`) - end - return - end - - if (RuntimeContext.Studio and RuntimeSettings.StudioDebugEnabled) or RuntimeSettings.LiveGameDebugEnabled then + if not respectDebugger or(RuntimeContext.Studio and RuntimeSettings.StudioDebugEnabled) or RuntimeSettings.LiveGameDebugEnabled then if type(arguments) == "table" then debugHandler(prefix, table.unpack(arguments)) else @@ -137,6 +128,7 @@ function EngineDebugger.GetCallStack(instance: LuaSourceContainer, stackName: st end function EngineDebugger.DebugInvalidData(paramNumber: number, funcName: string, expectedType: ExpectedType, param: unknown, debugHander: (...any) -> ()) + warn("DebugInvalidData is deprecated as of 4.0.0, please Guard instead") local ParamType = typeof(param) if ParamType ~= expectedType then @@ -155,13 +147,13 @@ function EngineDebugger.LogEvent(instance: LuaSourceContainer, eventName: string end if not EngineDebugger.CachedLogs[instance] then - EngineDebugger.CachedDebugCalls[instance] = { } + EngineDebugger.CachedLogs[instance] = { } end - table.insert(EngineDebugger.CachedDebugCalls[instance], eventName) + table.insert(EngineDebugger.CachedLogs[instance], eventName) if printLog then - EngineDebugger.Debug(print, eventName, "[Event Log]:") + EngineDebugger.Debug(print, eventName, "[Event]:") end end diff --git a/src/lua/framework/Vendor/Types.luau b/src/lua/framework/Vendor/Types.luau index ed8f128b..438a86f9 100644 --- a/src/lua/framework/Vendor/Types.luau +++ b/src/lua/framework/Vendor/Types.luau @@ -37,12 +37,12 @@ export type ClientNetworkController = { } export type ServerNetworkController = { - Listen: (self: ServerNetworkController, func: (sender: Player, data: ({T} | unknown)?) -> ()) -> (), - OnInvoke: (self: ServerNetworkController, callback: (sender: Player, data: ({T} | unknown)?) -> ({U} | U)) -> (), + Listen: (self: ServerNetworkController, func: (sender: Player, data: (Array | unknown)?) -> ()) -> (), + OnInvoke: (self: ServerNetworkController, callback: (sender: Player, data: (Array | unknown)?) -> (Array | U)) -> (), - Fire: (self: ServerNetworkController, recipient: Player | {Player}, data: (Array | T)?) -> (), + Fire: (self: ServerNetworkController, recipient: Player | Array, data: (Array | T)?) -> (), FireAll: (self: ServerNetworkController, data: (Array | T)?) -> (), - FireExcept: (self: ServerNetworkController, except: Player | {Player}, data: (Array | T)?) -> (), + FireExcept: (self: ServerNetworkController, except: Player | Array, data: (Array | T)?) -> (), FireInRange: (self: ServerNetworkController, comparePoint: Vector3, maximumRange: number, data: (Array | T)?) -> (), SetRateLimit: (self: ServerNetworkController, maxInvokesPerSecond: number, invokeOverflowCallback: (sender: Player) -> ()) -> (), diff --git a/src/lua/framework/init.luau b/src/lua/framework/init.luau index cc3c7f25..1ef9e02f 100644 --- a/src/lua/framework/init.luau +++ b/src/lua/framework/init.luau @@ -62,7 +62,7 @@ function CanaryEngine.GetEngineServer() CanaryEngineServer.Data = require(EngineVendor.Libraries.EasyProfile.Init) return table.freeze(CanaryEngineServer) else - Debugger.Debug(error, "Failed to fetch 'EngineServer', context must be server.", nil, false) + error("Failed to fetch 'EngineServer', context must be server.") return end end @@ -81,7 +81,7 @@ function CanaryEngine.GetEngineClient() return table.freeze(CanaryEngineClient) else - Debugger.Debug(error, "Failed to fetch 'EngineClient', context must be client.", nil, false) + error("Failed to fetch 'EngineClient', context must be client.") return end end