-
Notifications
You must be signed in to change notification settings - Fork 0
/
cartomancer.lua
75 lines (63 loc) · 2.25 KB
/
cartomancer.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
require 'cartomancer.init'
Cartomancer.path = assert(
Cartomancer.find_self('cartomancer.lua'),
"Failed to find mod folder. Make sure that `Cartomancer` folder has `cartomancer.lua` file!"
)
Cartomancer.load_mod_file('internal/config.lua', 'internal.config')
Cartomancer.load_mod_file('internal/atlas.lua', 'internal.atlas')
Cartomancer.load_mod_file('internal/ui.lua', 'internal.ui')
Cartomancer.load_mod_file('internal/keybinds.lua', 'internal.keybinds')
Cartomancer.load_mod_file('core/view-deck.lua', 'core.view-deck')
Cartomancer.load_mod_file('core/flames.lua', 'core.flames')
Cartomancer.load_mod_file('core/optimizations.lua', 'core.optimizations')
Cartomancer.load_mod_file('core/jokers.lua', 'core.jokers')
Cartomancer.load_mod_file('core/hand.lua', 'core.hand')
Cartomancer.load_config()
Cartomancer.INTERNAL_jokers_menu = false
-- TODO dedicated keybinds file? keybinds need to load after config
Cartomancer.register_keybind {
name = 'hide_joker',
func = function (controller)
Cartomancer.hide_hovered_joker(controller)
end
}
Cartomancer.register_keybind {
name = 'toggle_tags',
func = function (controller)
Cartomancer.SETTINGS.hide_tags = not Cartomancer.SETTINGS.hide_tags
Cartomancer.update_tags_visibility()
end
}
Cartomancer.register_keybind {
name = 'toggle_consumables',
func = function (controller)
Cartomancer.SETTINGS.hide_consumables = not Cartomancer.SETTINGS.hide_consumables
end
}
Cartomancer.register_keybind {
name = 'toggle_deck',
func = function (controller)
Cartomancer.SETTINGS.hide_deck = not Cartomancer.SETTINGS.hide_deck
end
}
Cartomancer.register_keybind {
name = 'toggle_jokers',
func = function (controller)
if not (G and G.jokers) then
return
end
G.jokers.cart_hide_all = not G.jokers.cart_hide_all
if G.jokers.cart_hide_all then
Cartomancer.hide_all_jokers()
else
Cartomancer.show_all_jokers()
end
Cartomancer.align_G_jokers()
end
}
Cartomancer.register_keybind {
name = 'toggle_jokers_buttons',
func = function (controller)
Cartomancer.SETTINGS.jokers_controls_buttons = not Cartomancer.SETTINGS.jokers_controls_buttons
end
}