• 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 25: Line 25:  
success, data = U.loadData("Data/Ship")
 
success, data = U.loadData("Data/Ship")
 
else
 
else
return "Invalid equipmentOrShip value: " .. equipmentOrShip
+
return "Invalid equipmentOrShip value"
 
end
 
end
 
if not success then return "No data for ships: " .. itemType end
 
if not success then return "No data for ships: " .. itemType end
Line 39: Line 39:  
 
 
if not equipment then
 
if not equipment then
for k, v in pairs(data) do
+
for k, v in pairs(data) do
if v.type == itemType and v.remodellv ~= '' then
+
if v.type == itemType and v.remodellv ~= '' then
local name = v.name[3]
+
local name = v.name[3]
local success = 0
+
local success = 0
for k, v in pairs(remodelSuffix) do
+
for k, v in pairs(remodelSuffix) do
if success == 0 and v ~= nil and v ~= "" then
+
if success == 0 and v ~= nil and v ~= "" then
name,success = name:gsub("." .. v, "/" .. v)
+
name,success = name:gsub("." .. v, "/" .. v)
 +
end
 
end
 
end
 +
result = result .. string.format(template.item, name)
 
end
 
end
result = result .. string.format(template.item, name)
   
end
 
end
end
   
else
 
else
 
for k, v in pairs(data) do
 
for k, v in pairs(data) do
if v.type == itemType then
+
if v.type == itemType then
local name = v.name[2]
+
local name = v.name[2]
result = result .. string.format(template.item, name)
+
result = result .. string.format(template.item, name)
 +
end
 
end
 
end
end
   
end
 
end
 
 
Line 129: Line 129:  
 
 
local frame = {}
 
local frame = {}
 +
frame.args = {}
 +
frame.args['equipmentOrShip'] = ""
 +
frame.args['itemType'] = ""
 +
frame.args['remodelSuffix'] = ""
 +
frame.args['notes'] = ""
 +
frame.args['coloring'] = ""
 +
mw.log(ListOfSortable.ParseAndGenerate(frame))
 +
 +
local frame = {}
 +
frame.args = {}
 +
mw.log(ListOfSortable.ParseAndGenerate(frame))
 +
 +
frame = {}
 
frame.args = {}
 
frame.args = {}
 
frame.args['equipmentOrShip'] = "Equipment"
 
frame.args['equipmentOrShip'] = "Equipment"
Line 136: Line 149:  
frame.args['coloring'] = ""
 
frame.args['coloring'] = ""
 
mw.log(ListOfSortable.ParseAndGenerate(frame))
 
mw.log(ListOfSortable.ParseAndGenerate(frame))
+
local frame = {}
+
frame = {}
 
frame.args = {}
 
frame.args = {}
 
frame.args['equipmentOrShip'] = "Ship"
 
frame.args['equipmentOrShip'] = "Ship"
1,031

edits

Navigation menu