Skip to content

Commit e37261c

Browse files
committed
Remove is_info_queue variable, it's unnecessary
1 parent 6750c4e commit e37261c

File tree

5 files changed

+2
-27
lines changed

5 files changed

+2
-27
lines changed

lovely/center.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,8 @@ match_indent = true
103103
payload = '''
104104
elseif _c.generate_ui and type(_c.generate_ui) == 'function' then
105105
local specific_vars = specific_vars or {}
106-
if is_info_queue then specific_vars.is_info_queue = true end
107106
_c:generate_ui(info_queue, card, desc_nodes, specific_vars, full_UI_table)
108-
if is_info_queue then
107+
if desc_nodes ~= full_UI_table.main then
109108
--desc_nodes.loc_name = {}
110109
--local set = name_override and "Other" or _c.set
111110
--local key = name_override or _c.key

lovely/fixes.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,6 @@ position = 'at'
132132
match_indent = true
133133
payload = '''function generate_card_ui(_c, full_UI_table, specific_vars, card_type, badges, hide_desc, main_start, main_end, card)
134134
if _c.specific_vars then specific_vars = _c.specific_vars end
135-
local is_info_queue = false
136-
if specific_vars and specific_vars.is_info_queue then
137-
is_info_queue = true
138-
specific_vars = nil
139-
end
140135
'''
141136

142137
[[patches]]

lovely/multi_box_descriptions.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ payload = '''
1616
args.AUT = args.AUT or {}
1717
args.AUT.box_colours = {}
1818
if (args.type == 'descriptions' or args.type == 'other') and type(loc_target.text) == 'table' and type(loc_target.text[1]) == 'table' then
19-
if not args.is_info_queue then
20-
args.AUT.multi_box = {}
21-
end
19+
args.AUT.multi_box = args.AUT.multi_box or {}
2220
for i, box in ipairs(loc_target.text_parsed) do
2321
for j, line in ipairs(box) do
2422
local final_line = SMODS.localize_box(line, args)

lovely/ui.toml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -308,19 +308,6 @@ payload = "badges[#badges + 1] = create_badge(((card.ability.name == 'Pluto' or
308308

309309
# Fixing description error when info_queue has multi-box descriptions.
310310

311-
312-
[[patches]]
313-
[patches.pattern]
314-
target = 'functions/common_events.lua'
315-
pattern = '''
316-
generate_card_ui(v, full_UI_table)
317-
'''
318-
position = "at"
319-
payload = '''
320-
generate_card_ui(v, full_UI_table, {is_info_queue = true})
321-
'''
322-
match_indent = true
323-
324311
[[patches]]
325312
[patches.pattern]
326313
target = 'functions/misc_functions.lua'

src/game_object.lua

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,6 @@ Set `prefix_config.key = false` on your object instead.]]):format(obj.key), obj.
11531153
vars =
11541154
specific_vars or {}
11551155
}
1156-
if target.vars.is_info_queue then target.is_info_queue = true; target.vars.is_info_queue = nil end
11571156
local res = {}
11581157
if self.loc_vars and type(self.loc_vars) == 'function' then
11591158
res = self:loc_vars(info_queue, card) or {}
@@ -1394,7 +1393,6 @@ Set `prefix_config.key = false` on your object instead.]]):format(obj.key), obj.
13941393
AUT = full_UI_table,
13951394
vars = {}
13961395
}
1397-
if target.vars.is_info_queue then target.is_info_queue = true; target.vars.is_info_queue = nil end
13981396
local res = {}
13991397
if self.loc_vars and type(self.loc_vars) == 'function' then
14001398
res = self:loc_vars(info_queue, card) or {}
@@ -1796,7 +1794,6 @@ Set `prefix_config.key = false` on your object instead.]]):format(obj.key), obj.
17961794
AUT = full_UI_table,
17971795
vars = specific_vars or {},
17981796
}
1799-
if target.vars.is_info_queue then target.is_info_queue = true; target.vars.is_info_queue = nil end
18001797
local res = {}
18011798
if self.loc_vars and type(self.loc_vars) == 'function' then
18021799
res = self:loc_vars(info_queue, card) or {}
@@ -2914,7 +2911,6 @@ Set `prefix_config.key = false` on your object instead.]]):format(obj.key), obj.
29142911
AUT = full_UI_table,
29152912
vars = specific_vars
29162913
}
2917-
if target.vars.is_info_queue then target.is_info_queue = true; target.vars.is_info_queue = nil end
29182914
local res = {}
29192915
if self.loc_vars and type(self.loc_vars) == 'function' then
29202916
-- card is actually a `Tag` here

0 commit comments

Comments
 (0)