Line 16: |
Line 16: |
| | colspan="${ja_colspan}" | <span lang="ja" style="font-family: sans-serif;">${ja}</span> | | | colspan="${ja_colspan}" | <span lang="ja" style="font-family: sans-serif;">${ja}</span> |
| ${en_cell}| ${note}]=], | | ${en_cell}| ${note}]=], |
| + | note = [[|- |
| + | | colspan="5" |${note}"]], |
| } | | } |
| | | |
| local lines = { | | local lines = { |
| "Introduction", "Library", "Secretary 1", "Secretary 2", "Secretary 3", "Idle", "Secretary Married", "Wedding", | | "Introduction", "Library", "Secretary 1", "Secretary 2", "Secretary 3", "Idle", "Secretary Married", "Wedding", |
− | "Looking At Scores", "Joining A Fleet", "Equipment 1", "Equipment 2", "Equipment 3", "Supply", | + | "Looking At Scores", "Joining A Fleet", "Equipment 1", "Equipment 2", "Equipment 3", "Supply", {extra = "Modernization"}, |
| "Docking Minor", "Docking Major", "Docking Complete", "Construction", | | "Docking Minor", "Docking Major", "Docking Complete", "Construction", |
| "Returning From Sortie", "Starting A Sortie", "Battle Start", "Attack", "Night Battle", "Night Attack", "MVP", | | "Returning From Sortie", "Starting A Sortie", "Battle Start", "Attack", "Night Battle", "Night Attack", "MVP", |
Line 26: |
Line 28: |
| } | | } |
| | | |
− | function insertRow(result, remodel, args, line) | + | local notes = { |
| + | ["Equipment 3"] = "Equipment 3 is shared with expedition selection, resource collection, instant repair and development.", |
| + | ["Night Attack"] = "Night attack is shared with [[Combat#Artillery_Spotting|Artillery Spotting]], [[Combat#Night_Special_Attack_Modifier|Night Special Attack]] and [[Expedition#Support_expedition|support expedition team]] arrival.", |
| + | ["Modernization"] = "Modernization is shared with remodeling line.", |
| + | } |
| + | |
| + | function insertRow(result, remodel, args, line, extra) |
| local remodel_string = remodel == 0 and "" or "/" .. remodel | | local remodel_string = remodel == 0 and "" or "/" .. remodel |
| local ja, en, note = args[line .. remodel_string], args[line .. remodel_string .. "/En"], args[line .. remodel_string .. "/Note"] | | local ja, en, note = args[line .. remodel_string], args[line .. remodel_string .. "/En"], args[line .. remodel_string .. "/Note"] |
− | if remodel == 0 or ja or en or note then | + | local jaEn = args[line .. remodel_string .. "/Both"] |
| + | if remodel == 0 and not extra or ja or en or note then |
| table.insert(result, format{ | | table.insert(result, format{ |
| templates.row, | | templates.row, |
Line 39: |
Line 48: |
| ship = args.ship, | | ship = args.ship, |
| suffix = ({[0] = "", [1] = "Kai", [2] = "Kai2"})[remodel], | | suffix = ({[0] = "", [1] = "Kai", [2] = "Kai2"})[remodel], |
− | line = line | + | line = line, |
| }, | | }, |
| }, | | }, |
| line = line, | | line = line, |
| ja = ja or "", | | ja = ja or "", |
− | ja_colspan = ja and not en and "2" or "1", | + | ja_colspan = jaEn and "2" or "1", |
− | en_cell = ja and not en and "" or "|" .. (en or "") .. "\n", | + | en_cell = jaEn and "" or "|" .. (en or "") .. "\n", |
| note = note or "", | | note = note or "", |
| }) | | }) |
| + | return 1 |
| end | | end |
| + | return 0 |
| end | | end |
| | | |
Line 58: |
Line 69: |
| table.insert(result, templates.header) | | table.insert(result, templates.header) |
| for _, line in pairs(lines) do | | for _, line in pairs(lines) do |
− | insertRow(result, 0, args, line) | + | local extra, line = line.extra and true or false, line.extra or line |
− | insertRow(result, 1, args, line) | + | local added = insertRow(result, 0, args, line, extra) |
− | insertRow(result, 2, args, line) | + | added = added + insertRow(result, 1, args, line, extra) |
| + | added = added + insertRow(result, 2, args, line, extra) |
| + | local note = notes[line] |
| + | if note and added > 0 then |
| + | table.insert(result, format{templates.note, note = note}) |
| + | end |
| end | | end |
| table.insert(result, templates.footer) | | table.insert(result, templates.footer) |