Line 49: |
Line 49: |
| ['Hard'] = 'FFCDD2', | | ['Hard'] = 'FFCDD2', |
| ['?'] = 'BBDEFB' | | ['?'] = 'BBDEFB' |
| + | } |
| + | |
| + | local rarity_color = { |
| + | [true] = { |
| + | [false] = 'C8E6C9', |
| + | [true] = 'C8E6C9', |
| + | }, |
| + | [false] = { |
| + | [false] = 'FFE0B2', |
| + | [true] = 'FFCDD2', |
| + | }, |
| } | | } |
| | | |
Line 55: |
Line 66: |
| ['Medium'] = 'Medium+', | | ['Medium'] = 'Medium+', |
| ['Hard'] = 'Hard+', | | ['Hard'] = 'Hard+', |
− | ['?'] = '?' | + | ['?'] = '?', |
| + | ['✓'] = '✓', |
| } | | } |
| | | |
Line 118: |
Line 130: |
| local ship_table = Ship:get_table(ship, '') | | local ship_table = Ship:get_table(ship, '') |
| if ship_table and ship_table._type then | | if ship_table and ship_table._type then |
| + | local ignored, rare = find(ignored_ships, ship), find(rare_ships, ship) |
| if find(tbl.rows, ship, 'ship') then | | if find(tbl.rows, ship, 'ship') then |
| log('ship duplicate', ship) | | log('ship duplicate', ship) |
− | elseif find(ignored_ships, ship) then | + | elseif not args.regular and ignored then |
| log('ship ignored', ship) | | log('ship ignored', ship) |
| else | | else |
| table.insert(tbl.rows, { | | table.insert(tbl.rows, { |
| ship = ship, | | ship = ship, |
− | rare = find(rare_ships, ship), | + | rare = not args.regular and rare, |
| + | regular = args.regular, |
| type = Formatting:format_ship_code(ship_table._type) or '?', | | type = Formatting:format_ship_code(ship_table._type) or '?', |
| nodes = {} | | nodes = {} |
Line 141: |
Line 155: |
| node = node_arg:match(args_grammar.just_node) | | node = node_arg:match(args_grammar.just_node) |
| end | | end |
− | diff = diff_names[diff] and diff or '?' | + | diff = args.regular and '✓' or diff_names[diff] and diff or '?' |
| if node and diff then | | if node and diff then |
| local node = string.upper(node) | | local node = string.upper(node) |
Line 150: |
Line 164: |
| else | | else |
| row.nodes[node] = { | | row.nodes[node] = { |
− | color = diff_colors[diff], | + | color = args.regular and rarity_color[ignored][rare] or diff_colors[diff], |
| diff = diff_names[diff], | | diff = diff_names[diff], |
| tooltip = tooltip, | | tooltip = tooltip, |
Line 205: |
Line 219: |
| add(format{table_format.type_cell, type = row.type}) | | add(format{table_format.type_cell, type = row.type}) |
| add(format{ | | add(format{ |
− | row.rare and table_format.rare_ship_cell or table_format.ship_cell, | + | row.regular and table_format.ship_cell or row.rare and table_format.rare_ship_cell or table_format.ship_cell, |
| ship = row.ship | | ship = row.ship |
| }) | | }) |