• 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 24: Line 24:  
local shipCapabilities = {}
 
local shipCapabilities = {}
 
local equipment = nil
 
local equipment = nil
local filterArg = nil
+
local filterArg = {}
    
-- $('.calc-debug').show().appendTo('#mw-content-text')
 
-- $('.calc-debug').show().appendTo('#mw-content-text')
Line 401: Line 401:  
         return format_arg("")
 
         return format_arg("")
 
     elseif prefix == "~" then
 
     elseif prefix == "~" then
     filterArg = string.sub(arg, 2)
+
     table.insert(filterArg, string.sub(arg, 2))
 
     elseif prefix == "@" then
 
     elseif prefix == "@" then
 
         local enumerator = string.sub(arg, 2)
 
         local enumerator = string.sub(arg, 2)
Line 465: Line 465:  
             return frame:preprocess(format{string.sub(arg, 3), this = env[this] or ""})
 
             return frame:preprocess(format{string.sub(arg, 3), this = env[this] or ""})
 
         else
 
         else
         if filterArg then
+
         if #filterArg > 0 then
         local kv = mw.text.split(filterArg, "%s*~%s*")
+
         local test = true
        if tostring(ship[kv[1]](ship)) == kv[2] then
+
        for _, e in filterArg do
 +
        local kv = mw.text.split(e, "%s*~%s*")
 +
        if tostring(ship[kv[1]](ship)) ~= kv[2] then
 +
        test = false
 +
        break
 +
        end
 +
        end
 +
        if test then
 
         return format_arg(format_value(string.sub(arg, 2), ship, target))
 
         return format_arg(format_value(string.sub(arg, 2), ship, target))
 
         else
 
         else
cssedit, gkautomate
7,064

edits

Navigation menu