Skip to content

Commit

Permalink
rc11
Browse files Browse the repository at this point in the history
  • Loading branch information
2jammers committed Sep 22, 2024
1 parent 25a277e commit 0748197
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 32 deletions.
11 changes: 6 additions & 5 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
* * *

---
hide:

- navigation

* * *
---

# Changelog

Expand All @@ -15,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Fixes an error with controllers not loading

## [9.0.0-rc10] - 2024-09-21

### Fixed
Expand Down
41 changes: 16 additions & 25 deletions src/init.luau
Original file line number Diff line number Diff line change
Expand Up @@ -35,43 +35,34 @@ end

-- Starts/inits a list of controllers internally
local function LoadAllControllers(controllers: { Types.Controller<any> })
local InitiatedControllers = {}
local InitiatedControllers = {}

for _, controller in controllers do
if controller["Uses"] and type(controller.Uses) == "table" then
table.freeze(controller.Uses)
table.freeze(controller.Uses)
for _, usedController in controller.Uses :: any do
Debugger.Assert(
type(usedController["Init"]) == "function",
"IncorrectType", "Init", "function"
)
if usedController["Init"] then
LoadController(usedController.Init, "Init")
table.insert(InitiatedControllers, usedController)
table.remove(controllers, table.find(controllers, controller))
end
Debugger.Assert(type(usedController["Init"]) == "function", "IncorrectType", "Init", "function")
LoadController(usedController.Init, "Init")
table.insert(InitiatedControllers, usedController)
table.remove(controllers, table.find(controllers, controller))
end
end
end

Debugger.Assert(
type(controller["Init"]) == "function",
"IncorrectType", "Init", "function"
)
if controller["Init"] then
Debugger.Assert(type(controller["Init"]) == "function", "IncorrectType", "Init", "function")
LoadController(controller.Init, "Init")
table.insert(InitiatedControllers, controller)
table.insert(InitiatedControllers, controller)
end
end

for _, controller in InitiatedControllers do
Debugger.Assert(
type(controller["Start"]) == "function",
"IncorrectType", "Start", "function"
)
if controller["Start"] then
for _, controller in InitiatedControllers do
if controller["Start"] then
Debugger.Assert(type(controller["Start"]) == "function", "IncorrectType", "Start", "function")
LoadController(controller.Start, "Start")
end
end
end
end

-- Starts all the workers internally
Expand Down Expand Up @@ -141,9 +132,9 @@ end
local function Cycle(type: Types.CycleType, callback: (...any) -> ())
Debugger.Assert(not Started, "AlreadyStarted")
Debugger.Assert(DefaultCycleTypes[type], "ItemNotFound", type)
if type == "PreRender" and not RunService:IsClient() then
Debugger.Fatal("IncorrectContext", "WorkerType")
end
if type == "PreRender" and not RunService:IsClient() then
Debugger.Fatal("IncorrectContext", "WorkerType")
end
table.insert(
Storage.Cycles,
table.freeze({
Expand Down
2 changes: 1 addition & 1 deletion tests/server/Modules/KillPart.luau
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ local KillDebounce = false

local KillPart = {}

function KillPart.Start()
function KillPart.Init()
for _, part: Part in KillBricks do
part.Touched:Connect(function(basePart)
if KillDebounce then
Expand Down
2 changes: 1 addition & 1 deletion wally.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "lumin/framework"
description = "A lightning fast & amazing game framework for Roblox"
version = "9.0.0-rc10"
version = "9.0.0-rc11"
license = "MIT"
registry = "https://github.com/UpliftGames/wally-index"
realm = "shared"
Expand Down

0 comments on commit 0748197

Please sign in to comment.