-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathmain.lua
More file actions
66 lines (59 loc) · 1.59 KB
/
main.lua
File metadata and controls
66 lines (59 loc) · 1.59 KB
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
SMODS.current_mod.optional_features = {
retrigger_joker = true -- Quantum edition, retrigger joker one time
}
-- Main table for the mod
LOSTEDMOD = {
vars = {
the_joker_triggered = false,
},
funcs = {}
}
-- Debugging functions
function sendDebugMessage(msg)
print("[Lost Edition DEBUG] " .. tostring(msg))
end
function sendErrorMessage(msg)
print("[Lost Edition ERROR] " .. tostring(msg))
end
-- List of modules to be loaded
local includes = {
'tables',
'utilities',
'assets',
'compat',
'hooks/game',
'hooks/overrides',
'hooks/pow_mult',
'hooks/UI_definitions',
'hooks/intro',
'speed_options',
'music',
'themes',
'items',
}
-- Load modules
for _, include in ipairs(includes) do
local success, error_msg = pcall(function()
local init, error = SMODS.load_file("includes/" .. include .. ".lua")
if error then
sendErrorMessage("Failed to load " .. include .. " with error: " .. error)
else
if init then init() end
sendDebugMessage("Loaded module: " .. include)
end
end)
if not success then
sendErrorMessage("Error in module " .. include .. ": " .. error_msg)
end
end
-- Reset jokers on run start
function SMODS.current_mod.reset_game_globals(run_start)
G.GAME.negative_rate = 1
G.GAME.losted_mysterious_completed = false
LOSTEDMOD.funcs.reset_losted_obsidian_card()
LOSTEDMOD.funcs.reset_losted_moist_cake()
LOSTEDMOD.funcs.reset_losted_sarcophagus()
LOSTEDMOD.funcs.reset_losted_sticky()
end
function G.FUNCS.initPostSplash()
end