Skip to content

Commit

Permalink
Merge pull request #26 from Daemon6109/main
Browse files Browse the repository at this point in the history
Update init.luau
  • Loading branch information
2jammers authored Oct 7, 2024
2 parents 09c7af7 + 7d6ac00 commit be9084b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/init.luau
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ local function LoadControllersAsync(controllers: { Types.Controller<any> })
for _, lifecycle in Lifecycles do
if (controller :: any)[lifecycle.Name] then
table.insert(lifecycle.Listeners, (controller :: any)[lifecycle.Name])
if DefaultLifecycles[lifecycle.Name] then
LoadDefaultLifecycle(lifecycle)
end
end
end

Expand All @@ -123,6 +120,13 @@ local function LoadControllersAsync(controllers: { Types.Controller<any> })
LoadController(controller.Start, "Start")
end
end

-- Connect default lifecycles
for _, lifecycle in Lifecycles do
if DefaultLifecycles[lifecycle.Name] then
LoadDefaultLifecycle(lifecycle)
end
end
end

-- Loads all of the provided directories
Expand Down

0 comments on commit be9084b

Please sign in to comment.