@@ -386,18 +386,25 @@ end
386386[[patches ]]
387387[patches .pattern ]
388388target = ' functions/UI_definitions.lua'
389- pattern = " local text_table = loc_target"
389+ pattern = '''
390+ local loc_name = localize{type = 'name_text', key = blind_choice.config.key, set = 'Blind'}
391+ local text_table = loc_target
392+ '''
390393match_indent = true
391394position = ' at'
392395payload = '''
396+ local loc_name = localize{type = 'name_text', key = target.key or blind_choice.config.key, set = target.set or 'Blind'}
393397local text_table = G.localization.descriptions[target.set][target.key].text_parsed
394398'''
395399
396400# create_UIBox_blind_popup()
397401[[patches ]]
398402[patches .pattern ]
399403target = ' functions/UI_definitions.lua'
400- pattern = ''' local loc_target = localize{type = 'raw_descriptions', key = blind.key, set = 'Blind', vars = vars or blind.vars}'''
404+ pattern = '''
405+ local loc_target = localize{type = 'raw_descriptions', key = blind.key, set = 'Blind', vars = vars or blind.vars}
406+ local loc_name = localize{type = 'name_text', key = blind.key, set = 'Blind'}
407+ '''
401408match_indent = true
402409position = ' at'
403410payload = '''
@@ -410,7 +417,8 @@ if blind.collection_loc_vars and type(blind.collection_loc_vars) == 'function' t
410417 target.scale = res.scale
411418 target.text_colour = res.text_colour
412419end
413- local loc_target = G.localization.descriptions[target.set][target.key].text_parsed'''
420+ local loc_target = G.localization.descriptions[target.set][target.key].text_parsed
421+ local loc_name = localize{type = 'name_text', key = target.key or blind.key, set = target.set or 'Blind'}'''
414422
415423[[patches ]]
416424[patches .pattern ]
@@ -424,6 +432,36 @@ payload = '''
424432ability_text[#ability_text + 1] = {n=G.UIT.R, config={align = "cm"}, nodes=SMODS.localize_box(v, {default_col = target.text_colour or G.C.WHITE, shadow = true, vars = target.vars, scale = target.scale})}
425433'''
426434
435+ # create_UIBox_round_scores_row()
436+ [[patches ]]
437+ [patches .pattern ]
438+ target = ' functions/UI_definitions.lua'
439+ pattern = '''
440+ local blind_choice = {config = G.GAME.blind.config.blind or G.P_BLINDS.bl_small}
441+ '''
442+ match_indent = true
443+ position = ' after'
444+ payload = '''
445+ local target = {type = 'name_text', key = blind_choice.config.key, set = 'Blind'}
446+ if blind_choice.config.loc_vars and type(blind_choice.config.loc_vars) == 'function' then
447+ local res = blind_choice.config:loc_vars() or {}
448+ target.key = res.key or target.key
449+ target.set = res.set or target.set
450+ end
451+ '''
452+
453+ [[patches ]]
454+ [patches .pattern ]
455+ target = ' functions/UI_definitions.lua'
456+ pattern = '''
457+ {n=G.UIT.O, config={object = DynaText({string = localize{type ='name_text', key = blind_choice.config.key, set = 'Blind'}, colours = {G.C.WHITE},shadow = true, float = true,maxw = 2.2, scale = 0.45})}}
458+ '''
459+ match_indent = true
460+ position = ' at'
461+ payload = '''
462+ {n=G.UIT.O, config={object = DynaText({string = localize(target), colours = {G.C.WHITE},shadow = true, float = true,maxw = 2.2, scale = 0.45})}}
463+ '''
464+
427465# get_new_boss()
428466[[patches ]]
429467[patches .pattern ]
0 commit comments