• 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 U = require('Module:Utils')
+
local U = require('Module:Core')
 
local NodeInfo = require('Module:NodeInfo')
 
local NodeInfo = require('Module:NodeInfo')
    
local templates = {
 
local templates = {
     title = '<div id="${map} ${node}" style="width:680px;text-align:center">${map} ${node}${nameSuffix} ([https://db.kcwiki.moe/drop/map/${world_number}${map_number}/${node}-SAB.html PoiDB])</div>\n',
+
     title = '<div id="${map} ${node}">${map} ${node}${nameSuffix} ([https://db.kcwiki.moe/drop/map/${world_number}${map_number}/${node}-SAB.html PoiDB])</div>\n',
     title_simple = '<div id="${map} ${node}" style="width:680px;text-align:center">${map} ${node}${nameSuffix}</div>\n',
+
     title_simple = '<div id="${map} ${node}">${map} ${node}${nameSuffix}</div>\n',
     event_title = '<div id="${map} ${node} ${diff}" style="width:680px;text-align:center">${map} ${node}${nameSuffix} ([https://db.kcwiki.moe/drop/map/${world_number}${map_number}/${diff_number}/${node}-SAB.html PoiDB])</div>\n',
+
     event_title = '<div id="${map} ${node} ${diff}">${map} ${diff} ${node}${nameSuffix} ([https://db.kcwiki.moe/drop/map/${world_number}${map_number}/${diff_number}/${node}-SAB.html PoiDB])</div>\n',
     event_title_simple = '<div id="${map} ${node} ${diff}" style="width:680px;text-align:center">${map} ${node}${nameSuffix}</div>\n',
+
     event_title_simple = '<div id="${map} ${node} ${diff}">${map} ${diff} ${node}${nameSuffix}</div>\n',
 
}
 
}
   Line 16: Line 16:  
     ["World 5"] = 5,
 
     ["World 5"] = 5,
 
     ["World 6"] = 6,
 
     ["World 6"] = 6,
 +
    ["World 7"] = 7,
 
     ["Winter 2016 Event"] = 33,
 
     ["Winter 2016 Event"] = 33,
 
     ["Spring 2016 Event"] = 34,
 
     ["Spring 2016 Event"] = 34,
Line 30: Line 31:  
     ["Summer 2019 Event"] = 45,
 
     ["Summer 2019 Event"] = 45,
 
     ["Fall 2019 Event"] = 46,
 
     ["Fall 2019 Event"] = 46,
 +
    ["Hinamatsuri 2020 Mini-Event"] = 47,
 +
    ["Rainy-Summer 2020 Event"] = 48,
 +
    ["Fall 2020 Event"] = 49,
 +
    ["Spring 2021 Event"] = 50,
 +
    ["Summer 2021 Event"] = 51,
 +
    ["Fall 2021 Event"] = 52,
 +
    ["Winter 2022 Event"] = 53,
 +
    ["Spring 2022 Event"] = 54,
 +
    ["Summer 2022 Event"] = 55,
 +
    ["Early Spring 2023 Event"] = 56,
 +
    ["Summer 2023 Event"] = 57,
 +
    ["Early Spring 2024 Event"] = 58,
 
}
 
}
    
local diff_numbers_legacy = {
 
local diff_numbers_legacy = {
 +
    ["Regular"] = 0,
 
     ["Easy"] = 1,
 
     ["Easy"] = 1,
 
     ["Normal"] = 2,
 
     ["Normal"] = 2,
Line 40: Line 54:     
local diff_numbers = {
 
local diff_numbers = {
 +
    ["Regular"] = 0,
 
     ["Casual"] = 1,
 
     ["Casual"] = 1,
 
     ["Easy"] = 2,
 
     ["Easy"] = 2,
Line 51: Line 66:     
     local world, map = string.match(pagename, "([^/]+)/([^/]+)")
 
     local world, map = string.match(pagename, "([^/]+)/([^/]+)")
     world = world or pagename
+
     world = args.world or world or '??'
     map = map or "??"
+
     map = args.map or map or '??'
    
     local world_number = world_numbers[world] or "??"
 
     local world_number = world_numbers[world] or "??"
Line 64: Line 79:  
     local diff = diffs[args.diff] and args.diff
 
     local diff = diffs[args.diff] and args.diff
 
     local diff_number = diffs[diff] or "??"
 
     local diff_number = diffs[diff] or "??"
 +
    local is_event_diff = diff and diff ~= 'Regular'
    
     local nameSuffix = args.name and ": " .. args.name or ""
 
     local nameSuffix = args.name and ": " .. args.name or ""
Line 69: Line 85:  
     return U.format{
 
     return U.format{
 
         (is_simple_node_type and
 
         (is_simple_node_type and
             (diff and templates.event_title_simple or templates.title_simple) or
+
             (is_event_diff and templates.event_title_simple or templates.title_simple) or
             (diff and templates.event_title or templates.title)),
+
             (is_event_diff and templates.event_title or templates.title)),
 
         map = map,
 
         map = map,
 
         node = node,
 
         node = node,
Line 85: Line 101:  
         local args = U.getTemplateArgs(frame)
 
         local args = U.getTemplateArgs(frame)
 
         local world, map = string.match(args.implicit.pagename, "([^/]+)/([^/]+)")
 
         local world, map = string.match(args.implicit.pagename, "([^/]+)/([^/]+)")
         args.implicit.world = world or '??'
+
         args.implicit.world = args.explicit.world or world or '??'
         args.implicit.map = map or '??'
+
         args.implicit.map = args.explicit.map or map or '??'
 
         local table_string = NodeInfo:Table(args.explicit, args.implicit)
 
         local table_string = NodeInfo:Table(args.explicit, args.implicit)
 
         if args.explicit.diff or args.implicit.pagename and args.implicit.pagename:sub(1, 5) == "World" then
 
         if args.explicit.diff or args.implicit.pagename and args.implicit.pagename:sub(1, 5) == "World" then
cssedit, gkautomate
6,926

edits

Navigation menu