Line 22: |
Line 22: |
| _column_cell_templates = { | | _column_cell_templates = { |
| node = [[| colspan="${colspan}" rowspan="${rowspan}" style="text-align: center; color: ${color}; background-color: ${bg_color};" |${values.node}]], | | node = [[| colspan="${colspan}" rowspan="${rowspan}" style="text-align: center; color: ${color}; background-color: ${bg_color};" |${values.node}]], |
− | formation = [[| style="text-align: center; background-color: ${bg_color}; color: ${color}; font-weight: ${font_weight};" |${values.formation}]], | + | formation = [[| style="text-align: center; background-color: ${bg_color}; color: ${color};" |${values.formation}]], |
| fleet = [[| style="width: 490px; background-color: ${bg_color};" |${values.fleet}]], | | fleet = [[| style="width: 490px; background-color: ${bg_color};" |${values.fleet}]], |
− | as = [[| style="text-align: center; background-color: ${bg_color}; color: ${color}; font-weight: ${font_weight};" |${values.as}]], | + | as = [[| style="text-align: center; background-color: ${bg_color}; color: ${color};" |${values.as}]], |
| }, | | }, |
| _column_cell_templates_basexp = { | | _column_cell_templates_basexp = { |
| node = [[| colspan="${colspan}" rowspan="${rowspan}" style="text-align: center; color: ${color}; background-color: ${bg_color};" |${values.node}]], | | node = [[| colspan="${colspan}" rowspan="${rowspan}" style="text-align: center; color: ${color}; background-color: ${bg_color};" |${values.node}]], |
− | formation = [[| style="text-align: center; background-color: ${bg_color}; color: ${color}; font-weight: ${font_weight};" |${values.formation}]], | + | formation = [[| style="text-align: center; background-color: ${bg_color}; color: ${color};" |${values.formation}]], |
− | basexp = [[| style="text-align: center; background-color: ${bg_color}; color: ${color}; font-weight: ${font_weight};" |${values.basexp}]], | + | basexp = [[| style="text-align: center; background-color: ${bg_color}; color: ${color};" |${values.basexp}]], |
| fleet = [[| style="width: 490px; background-color: ${bg_color};" |${values.fleet}]], | | fleet = [[| style="width: 490px; background-color: ${bg_color};" |${values.fleet}]], |
− | as = [[| style="text-align: center; background-color: ${bg_color}; color: ${color}; font-weight: ${font_weight};" |${values.as}]], | + | as = [[| style="text-align: center; background-color: ${bg_color}; color: ${color};" |${values.as}]], |
| }, | | }, |
| _empty_node_template = [[| style="text-align: center;" |${values.node} | | _empty_node_template = [[| style="text-align: center;" |${values.node} |
Line 97: |
Line 97: |
| function NodeInfo:formation(row) | | function NodeInfo:formation(row) |
| if row.tags.final then | | if row.tags.final then |
− | row.formation = row.formation .. "<br />(Final)" | + | row.formation = row.formation .. "<br /><div style='font-weight:bold; color:red;'>(Final)</div>" |
| end | | end |
| if row.tags.clear then | | if row.tags.clear then |
− | row.formation = row.formation .. "<br />(Clear)" | + | row.formation = row.formation .. "<br /><div style='font-weight:bold; color:blue;'>(Clear)</div>" |
| end | | end |
− | local color, font_weight = "initial", "initial" | + | local color = "initial" |
− | if row.tags.boss or row.tags.final then | + | if row.tags.boss then |
| color = self._boss_battle_color | | color = self._boss_battle_color |
| end | | end |
− | if row.tags.final or row.tags.clear then
| + | return { values = { formation = row.formation }, color = color } |
− | font_weight = "bold"
| |
− | end
| |
− | if row.tags.clear then
| |
− | color = self._clear_battle_color
| |
− | end
| |
− | return { values = { formation = row.formation }, color = color, font_weight = font_weight } | |
| end | | end |
| | | |
| function NodeInfo:basexp(row) | | function NodeInfo:basexp(row) |
− | color, font_weight = "initial", "initial" | + | color = "initial" |
− | if row.tags.boss or row.tags.final then | + | if row.tags.boss then |
| color = self._boss_battle_color | | color = self._boss_battle_color |
| end | | end |
− | if row.tags.final or row.tags.clear then
| + | return { values = { basexp = row.basexp }, color = color } |
− | font_weight = "bold"
| |
− | end
| |
− | -- if a composition is at a boss node but is tagged as a clear comp, override the boss node color
| |
− | if row.tags.clear then
| |
− | color = self._clear_battle_color
| |
− | end
| |
− | return { values = { basexp = row.basexp }, color = color, font_weight = font_weight } | |
| end | | end |
| | | |
Line 135: |
Line 122: |
| | | |
| function NodeInfo:as(row) | | function NodeInfo:as(row) |
− | color, font_weight = "initial", "initial" | + | color = "initial" |
− | if row.tags.boss or row.tags.final then | + | if row.tags.boss then |
| color = self._boss_battle_color | | color = self._boss_battle_color |
| end | | end |
− | if row.tags.final or row.tags.clear then
| + | return { values = { as = row.as }, color = color } |
− | font_weight = "bold"
| |
− | end
| |
− | if row.tags.clear then
| |
− | color = self._clear_battle_color
| |
− | end
| |
− | return { values = { as = row.as }, color = color, font_weight = font_weight } | |
| end | | end |
| | | |
Line 526: |
Line 507: |
| | | |
| U.registerTableTests(NodeInfo, { | | U.registerTableTests(NodeInfo, { |
− | { "A", "Boss", "Line Ahead", "Northern Princess" } | + | { "A", "Normal/Clear", "Line Ahead", "Northern Princess" } |
| }) | | }) |
| -- p.run_table_tests() | | -- p.run_table_tests() |
| | | |
| return NodeInfo | | return NodeInfo |