-
Notifications
You must be signed in to change notification settings - Fork 0
/
import.lua
executable file
·88 lines (65 loc) · 1.58 KB
/
import.lua
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
local path = ""
-- FUNCTIONS:
-- Switches Path:
local function switch(newPath)
path = newPath
print("\n🔍 Loading in: *" .. newPath .. "*")
end
-- Loads a module:
local modCount = 0
local function load(request)
-- Module Path:
local location = path .. "/" .. request
local mod = require(location)
-- Feedback Prinout:
local out = "✅ Loaded Module: " .. request
-- Indentation:
local gap = " "
for i=#out, 35 do
gap = gap .. " "
end
-- Return Module:
print(out .. gap .. "(" .. location .. ")")
modCount = modCount + 1
return mod
end
-- IMPORT:
-- LIBRARIES:
-- Import Libraries:
switch("lib")
clr = load("color") -- Credit: https://github.com/randrews/color
Class = load("class") -- Credit: https://github.com/vrld/hump/
--Camera = load("camera") -- Credit: https://github.com/vrld/hump/
-- SOURCE:
-- Custom Libraries:
switch("src")
easy = load("easy")
save = load("save")
-- Import Classes:
switch("src/class")
load("Gui")
load("Button")
switch("src/class/Object")
load("Player")
load("Pipe")
load("Ground")
load("Background")
switch("src/class/Shop")
load("Shop")
load("Shopbutton")
-- DATA:
-- Game Data:
switch("data")
info = load("info")
controls = load("controls")
font = load("font")
config = load("config")
files = load("files")
-- Assets:
switch("assets")
sound = load("sounds")
image = load("images")
switch("data")
skins = load("skins")
-- End of Import:
print(clr.fg.YELLOW .. "\n" .. "☑️ Loaded Modules: " .. modCount .. clr.reset .. "\n")