-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.lua
More file actions
149 lines (136 loc) · 3.02 KB
/
main.lua
File metadata and controls
149 lines (136 loc) · 3.02 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
DPP = {
TABS = {},
libs = {},
local_config = {
is_open = false,
poker_hand_page = 1,
hands_per_page = 10,
},
-- config values in the config file
set_blind_number = "1",
card = {
rank = {
options = {},
page = 1,
func = 'rank'
},
suit = {
options = {},
page = 1,
func = 'suit'
},
enhancement = {
options = {"None"},
page = 1,
func = 'enhancement'
},
edition = {
options = {none = nil},
page = 1,
func = 'edition'
},
seal = {
options = {"None"},
page = 1,
func = 'seal'
},
sticker = {
options = {"None"},
page = 1,
func = 'sticker'
}
},
blind = {
options = {"Random"},
page = 1,
func = 'blind'
},
run = {
chips = 0,
blind_chips = 0,
dollars = 0,
HotPotato = {
plincoins = 0,
cryptocurrency = 0,
spark_points = 0, -- joker exchange
credits = 0,
}
},
gamespeed = 1,
menu_width = 3,
vars = {
inspector = {
new = '',
val = ''
},
savestates = {
page = 1,
id = '',
},
pages = {
meta = 1,
card = 1,
player = 1,
run = 1,
game = 1,
},
enable_card_inspector = false
-- Some are filled out in overrides.lua
},
keys = {}
}
SMODS.Atlas{key = "modicon", path = "modicon.png", px = 32, py = 32}
local exists
exists = love.filesystem.exists('DebugPlusPlus')
if not exists then love.filesystem.createDirectory('DebugPlusPlus') end
exists = nil
local required_folders = {
'settings',
'savestates'
}
for _, v in ipairs(required_folders) do
local exists = love.filesystem.exists('DebugPlusPlus/'..v)
if not exits then love.filesystem.createDirectory('DebugPlusPlus/'..v) end
end
-- Load mod files
DPP.config = SMODS.current_mod.config
local files = {
"callback_functions",
"aux_functions",
"overrides",
"main_UI"
}
for k, v in pairs(files) do -- Load this mod's files
assert(SMODS.load_file('/'..v..'.lua'))()
end
DPP.reload_lists()
create_UIBox_debug_tools()
SMODS.Keybind({
key_pressed = "tab",
event = "pressed",
action = function()
if DPP.config.require_ctrl and not DPP.keys.lctrl then return end
if not DPP.config.override_overlay and G.OVERLAY_MENU and not DPP.local_config.is_open then return end
if not DPP.local_config.is_open or not G.OVERLAY_MENU then
G.FUNCS.DPP_main_menu()
DPP.local_config.is_open = true
elseif DPP.local_config.is_open then
G.FUNCS.exit_overlay_menu()
DPP.local_config.is_open = false
end
end,
})
SMODS.Keybind({
key_pressed = "lctrl",
event = "pressed",
action = function()
DPP.keys.lctrl = true
end,
})
SMODS.Keybind({
key_pressed = "lctrl",
event = "released",
action = function()
DPP.keys.lctrl = false
end,
})