Module:Damage: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 539: Line 539:
                     -- Append suffix for each keyword in current row
                     -- Append suffix for each keyword in current row
                     for _, keyword in ipairs(current_row.keywords) do
                     for _, keyword in ipairs(current_row.keywords) do
                        -- If needed, move the suffix to the rightmost of main_key.
                        if current_row.keyword_next_to_main_key then
                            new_key = prev_key:gsub(main_key, main_key .. '_' .. keyword)
                        end
                         -- Iterate through previous keys
                         -- Iterate through previous keys
                         for _, prev_key in ipairs(all_list) do
                         for _, prev_key in ipairs(all_list) do
                             local new_key = prev_key .. '_' .. keyword
                             local new_key = prev_key .. '_' .. keyword
                            -- If needed, move the suffix to the rightmost of main_key.
                            if current_row.keyword_next_to_main_key then
                                new_key = prev_key:gsub(main_key, main_key .. '_' .. keyword)
                            end
                             table.insert(new_list, new_key)
                             table.insert(new_list, new_key)
                         end
                         end
Line 649: Line 648:
         doContentByMode('PvP')
         doContentByMode('PvP')
     end
     end
     doTable()
     doTable()