• 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 325: Line 325:  
     local success, data = pcall(function () return require(string.format("Module:%s", name)) end)
 
     local success, data = pcall(function () return require(string.format("Module:%s", name)) end)
 
     -- module without return (or empty, nil, false, true return) gives success = true, data = true
 
     -- module without return (or empty, nil, false, true return) gives success = true, data = true
 +
    if data == true then
 +
        return false, nil
 +
    else
 +
        return success, data
 +
    end
 +
end
 +
 +
function Utils.loadData(name)
 +
    local success, data = pcall(function () return mw.loadData(string.format("Module:%s", name)) end)
 +
    -- TODO: ???
 
     if data == true then
 
     if data == true then
 
         return false, nil
 
         return false, nil
cssedit, gkautomate
7,064

edits

Navigation menu