• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
no edit summary
Line 1: Line 1: −
local Utils = require('Module:Utils')
+
local U = require('Module:Core')
local format = require('Module:Utils').format
+
local format = U.format
 
local getArgs = require('Module:GetArgs')
 
local getArgs = require('Module:GetArgs')
 
local Ship = require('Module:Ship')
 
local Ship = require('Module:Ship')
Line 12: Line 12:  
     footer = "|}",
 
     footer = "|}",
 
     audio_file = "${ship}${suffix}-${line}.ogg",
 
     audio_file = "${ship}${suffix}-${line}.ogg",
 +
    audio_file_new = "Ship Voice ${ship} ${line}.ogg",
 
     audio_button = [=[<span class="audio-button click-parent">[[Media:${audio_file}|Play]]</span>]=],
 
     audio_button = [=[<span class="audio-button click-parent">[[Media:${audio_file}|Play]]</span>]=],
 
     line_link = "[${link} ${line}]",
 
     line_link = "[${link} ${line}]",
Line 17: Line 18:  
     spoiler = [[<span style="background-color:#3a3a3a">${text}</span>]],
 
     spoiler = [[<span style="background-color:#3a3a3a">${text}</span>]],
 
     incomplete_style = "background:#fee;",
 
     incomplete_style = "background:#fee;",
     incomplete_category = Utils.category("Ship pages with incomplete quotes"),
+
     incomplete_category = U.category("Ship pages with incomplete quotes"),
 
     row = [=[|- ${style} class="shipquote" data-shipquote-id="${id}" data-shipquote-form="${form}"
 
     row = [=[|- ${style} class="shipquote" data-shipquote-id="${id}" data-shipquote-form="${form}"
 
| nowrap="nowrap" |${audio_button} ${line}
 
| nowrap="nowrap" |${audio_button} ${line}
Line 61: Line 62:  
     { name = "Major Damage", id = 21 },
 
     { name = "Major Damage", id = 21 },
 
     { name = "Sunk", spoiler = true, id = 22 },
 
     { name = "Sunk", spoiler = true, id = 22 },
 +
}
 +
 +
local migrated = {
 +
    ["Umikaze Kai Ni"] = true,
 
}
 
}
   Line 160: Line 165:  
             complete = false
 
             complete = false
 
         end
 
         end
 +
        local shipName = use_suffix and suffix or U.ijoin({ship, suffix}, ' ')
 +
        local isMigrated = migrated[shipName]
 
         table.insert(result, format{
 
         table.insert(result, format{
 
             templates.row,
 
             templates.row,
Line 166: Line 173:  
                 templates.audio_button,
 
                 templates.audio_button,
 
                 audio_file = format{
 
                 audio_file = format{
                     templates.audio_file,
+
                     isMigrated and templates.audio_file_new or templates.audio_file,
                     ship = use_suffix and suffix or ship,
+
                     ship = isMigrated and shipName or use_suffix and suffix or ship,
 
                     suffix = use_suffix and "" or suffix,
 
                     suffix = use_suffix and "" or suffix,
 
                     line = (same or line.name) .. (old and " Old" or ""),
 
                     line = (same or line.name) .. (old and " Old" or ""),
Line 192: Line 199:  
     -- [[Category:Todo]]: collect possible suffixes in insertRow?
 
     -- [[Category:Todo]]: collect possible suffixes in insertRow?
 
     local shipKai = Ship(ship_name .. "/Kai")
 
     local shipKai = Ship(ship_name .. "/Kai")
     return Utils.find(types, ship:type()) or Utils.find(types, shipKai:type())
+
     return U.find(types, ship:type()) or U.find(types, shipKai:type())
 
end
 
end
   Line 198: Line 205:     
function Quotes.ShipQuotes(frame, args)
 
function Quotes.ShipQuotes(frame, args)
     args = args or Utils.getTemplateArgs(frame)
+
     args = args or U.getTemplateArgs(frame)
 
     args.explicit.ship = args.explicit.ship or args.implicit.pagename or ""
 
     args.explicit.ship = args.explicit.ship or args.implicit.pagename or ""
 
     local result = {}
 
     local result = {}
cssedit, gkautomate
7,060

edits

Navigation menu