-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlovely.toml
47 lines (43 loc) · 1.01 KB
/
lovely.toml
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
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
[vars]
default_sort = "desc"
[[patches]]
[patches.pattern]
target = 'functions/button_callbacks.lua'
pattern = "G.hand:sort('desc')"
position = 'at'
payload = '''
if G.hand.config.sort == "desc" or G.hand.config.sort == "suit asc" then
G.hand:sort('asc')
else
G.hand:sort('desc')
end
'''
match_indent = true
[[patches]]
[patches.pattern]
target = 'functions/button_callbacks.lua'
pattern = "G.hand:sort('suit desc')"
position = 'at'
payload = '''
if G.hand.config.sort == "suit desc" or G.hand.config.sort == "asc" then
G.hand:sort('suit asc')
else
G.hand:sort('suit desc')
end
'''
match_indent = true
[[patches]]
[patches.pattern]
target = 'cardarea.lua'
pattern = "self.config.sort = config.sort or 'desc'"
position = 'at'
payload = '''
self.config.sort = config.sort or
(SMODS and SMODS.Mods['AizAscendingSort'].config.default_sort.options[SMODS.Mods['AizAscendingSort'].config.default_sort.value])
or '${{lovely:default_sort}}'
'''
match_indent = true