-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
44 lines (21 loc) · 890 Bytes
/
init.lua
File metadata and controls
44 lines (21 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
local concat
local function info()
local path = Astro.Path local info = require( path .. "info" )
local out = "Astro - Version Date: " .. info.VersionDate .. " - " .. info.ID
print( out .. '\n\n' .. concat )
end
-- This is the main module loader.
local paths = { Vector = true }
local function name(key) return paths[key] and key or key:lower() end
local modules = { "Config", "Type", "Math", "String", "Table", "Vector", "Layout" }
local function subRequire()
local path = Astro.Path require( path .. "legacy" )
for i,v in ipairs(modules) do
local path = path .. name(v) Astro[v] = require(path)
end
Astro.info = info
end
return function(path)
Astro = {} Astro.Path = path or './' subRequire()
local table = Astro.Table concat = table.concat(Astro)
end