mirror of
https://github.com/Ukendio/jecs.git
synced 2026-03-18 00:44:32 +00:00
36 lines
659 B
Text
36 lines
659 B
Text
|
|
local RunService = game:GetService("RunService")
|
||
|
|
|
||
|
|
local vide = require(script.Parent.Parent.Parent.vide)
|
||
|
|
local loop = require(script.Parent.Parent.Parent.modules.loop)
|
||
|
|
local widget = require(script.widget)
|
||
|
|
|
||
|
|
local cleanup = vide.cleanup
|
||
|
|
|
||
|
|
local home = {
|
||
|
|
class_name = "app" :: "app",
|
||
|
|
name = "Home"
|
||
|
|
}
|
||
|
|
|
||
|
|
function home.mount(_: nil, destroy: () -> ())
|
||
|
|
|
||
|
|
local servers = vide.source {} :: any
|
||
|
|
local app_loop = loop (
|
||
|
|
"app-client-home",
|
||
|
|
servers,
|
||
|
|
|
||
|
|
{i = 1},
|
||
|
|
script.systems.get_core_data
|
||
|
|
)
|
||
|
|
|
||
|
|
cleanup(
|
||
|
|
RunService.Heartbeat:Connect(app_loop)
|
||
|
|
)
|
||
|
|
|
||
|
|
return widget {
|
||
|
|
servers = servers,
|
||
|
|
destroy = destroy
|
||
|
|
}
|
||
|
|
|
||
|
|
end
|
||
|
|
|
||
|
|
return home
|