• 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
m
no edit summary
Line 190: Line 190:  
end
 
end
   −
function ShipPage.ClassTemplate(frame)
+
function ShipPage.ClassTemplate(frame, args)
     local args = U.getTemplateArgs(frame)
+
     args = args or U.getTemplateArgs(frame)
 
     local basepagename = args.implicit.basepagename or ""
 
     local basepagename = args.implicit.basepagename or ""
 
     local ship_name = args.explicit.ship or args.implicit.pagename or ""
 
     local ship_name = args.explicit.ship or args.implicit.pagename or ""
Line 197: Line 197:  
     local classI = ship:class()
 
     local classI = ship:class()
 
     local class = classI and classI:name_override() or "Unknown Class"
 
     local class = classI and classI:name_override() or "Unknown Class"
 +
    if basepagename == "Sandbox" then
 +
        return "Sandbox/" .. class
 +
    else
 +
        return class
 +
    end
 +
end
 +
 +
function ShipPage.ClassTemplateTest(frame, args)
 +
    args = args or U.getTemplateArgs(frame)
 +
    local basepagename = args.implicit.basepagename or ""
 +
    local ship_name = args.explicit.ship or args.implicit.pagename or ""
 +
    local ship = Ship(ship_name)
 +
    local classI = ship:class()
 +
    local class = classI and classI:base_name_test() or "Unknown Class"
 
     if basepagename == "Sandbox" then
 
     if basepagename == "Sandbox" then
 
         return "Sandbox/" .. class
 
         return "Sandbox/" .. class
cssedit, gkautomate
7,064

edits

Navigation menu