Changes

allowing KanmusuList to print max stats
Line 305: Line 305:  
         if shipType ~= nil then
 
         if shipType ~= nil then
 
             if shipType == shipmodule.data[id]["type"] then
 
             if shipType == shipmodule.data[id]["type"] then
                 shipListTable = shipListTable .. shipmodule.KanmusuListEntry(id)
+
                 shipListTable = shipListTable .. shipmodule.KanmusuListEntry(id, frame.args[2] ~= nil)
 
             end
 
             end
 
         else
 
         else
             shipListTable = shipListTable .. shipmodule.KanmusuListEntry(id)
+
             shipListTable = shipListTable .. shipmodule.KanmusuListEntry(id, frame.args[2] ~= nil)
 
         end
 
         end
 
     end
 
     end
Line 315: Line 315:  
end
 
end
   −
function shipmodule.KanmusuListEntry(id) -- Kanmusu List Table
+
function shipmodule.KanmusuListEntry(id, printMax) -- Kanmusu List Table
 
     local strings = '<tr>'
 
     local strings = '<tr>'
 
     local aircraftTotal = 0
 
     local aircraftTotal = 0
Line 361: Line 361:  
end
 
end
    +
    statLevel = 1 --base stat
 +
    if printMax then
 +
statLevel = 2 --max stat
 +
end
 +
 
     strings = strings .. '<td style="text-align: center;">' .. id .. '</td>'
 
     strings = strings .. '<td style="text-align: center;">' .. id .. '</td>'
 
     strings = strings .. '<td style="text-align: center;">[[' .. pagename .. '|' .. shipname ..']]</td>'
 
     strings = strings .. '<td style="text-align: center;">[[' .. pagename .. '|' .. shipname ..']]</td>'
 
     strings = strings .. '<td style="text-align: center;">' .. shipmodule.data[id]["class"] .. '</td>'
 
     strings = strings .. '<td style="text-align: center;">' .. shipmodule.data[id]["class"] .. '</td>'
 
     strings = strings .. '<td style="text-align: center;">' .. shipmodule.data[id]["type"] .. '</td>'
 
     strings = strings .. '<td style="text-align: center;">' .. shipmodule.data[id]["type"] .. '</td>'
     strings = strings .. '<td style="text-align: center; background-color: #f0bbbb;">' .. shipmodule.data[id]["fp"][1] .. '</td>'
+
     strings = strings .. '<td style="text-align: center; background-color: #f0bbbb;">' .. shipmodule.data[id]["fp"][statLevel] .. '</td>'
 
     if shipmodule.data[id]["torpedo"] == 0 then
 
     if shipmodule.data[id]["torpedo"] == 0 then
 
         strings = strings .. '<td style="text-align: center; background-color: #99eefa;">' .. shipmodule.data[id]["torpedo"] .. '</td>'
 
         strings = strings .. '<td style="text-align: center; background-color: #99eefa;">' .. shipmodule.data[id]["torpedo"] .. '</td>'
 
     else
 
     else
         strings = strings .. '<td style="text-align: center; background-color: #99eefa;">' .. shipmodule.data[id]["torpedo"][1] .. '</td>'
+
         strings = strings .. '<td style="text-align: center; background-color: #99eefa;">' .. shipmodule.data[id]["torpedo"][statLevel] .. '</td>'
 
     end
 
     end
 
     if shipmodule.data[id]["aa"] == 0 then
 
     if shipmodule.data[id]["aa"] == 0 then
 
         strings = strings .. '<td style="text-align: center; background-color: #faccaa;">' .. shipmodule.data[id]["aa"] .. '</td>'
 
         strings = strings .. '<td style="text-align: center; background-color: #faccaa;">' .. shipmodule.data[id]["aa"] .. '</td>'
 
     else
 
     else
         strings = strings .. '<td style="text-align: center; background-color: #faccaa;">' .. shipmodule.data[id]["aa"][1] .. '</td>'
+
         strings = strings .. '<td style="text-align: center; background-color: #faccaa;">' .. shipmodule.data[id]["aa"][statLevel] .. '</td>'
 
     end
 
     end
 
     if shipmodule.data[id]["asw"] == 0 then
 
     if shipmodule.data[id]["asw"] == 0 then
 
         strings = strings .. '<td style="text-align: center; background-color: #fff5ee;">' .. shipmodule.data[id]["asw"] .. '</td>'
 
         strings = strings .. '<td style="text-align: center; background-color: #fff5ee;">' .. shipmodule.data[id]["asw"] .. '</td>'
 
     else
 
     else
         strings = strings .. '<td style="text-align: center; background-color: #fff5ee;">' .. shipmodule.data[id]["asw"][1] .. '</td>'
+
         strings = strings .. '<td style="text-align: center; background-color: #fff5ee;">' .. shipmodule.data[id]["asw"][statLevel] .. '</td>'
 
     end
 
     end
     strings = strings .. '<td style="text-align: center; background-color: #afffee;">' .. shipmodule.data[id]["los"][1] .. '</td>'
+
     strings = strings .. '<td style="text-align: center; background-color: #afffee;">' .. shipmodule.data[id]["los"][statLevel] .. '</td>'
     strings = strings .. '<td style="text-align: center; background-color: #cbfbcb;">' .. shipmodule.data[id]["luck"][1] .. '</td>'
+
     strings = strings .. '<td style="text-align: center; background-color: #cbfbcb;">' .. shipmodule.data[id]["luck"][statLevel] .. '</td>'
 
     strings = strings .. '<td style="text-align: center; background-color: #ffe0eb;">' .. shipmodule.data[id]["hp"] .. '</td>'
 
     strings = strings .. '<td style="text-align: center; background-color: #ffe0eb;">' .. shipmodule.data[id]["hp"] .. '</td>'
     strings = strings .. '<td style="text-align: center; background-color: #ffffaa;">' .. shipmodule.data[id]["armor"][1] .. '</td>'
+
     strings = strings .. '<td style="text-align: center; background-color: #ffffaa;">' .. shipmodule.data[id]["armor"][statLevel] .. '</td>'
     strings = strings .. '<td style="text-align: center; background-color: #eeccee;">' .. shipmodule.data[id]["evasion"][1] .. '</td>'
+
     strings = strings .. '<td style="text-align: center; background-color: #eeccee;">' .. shipmodule.data[id]["evasion"][statLevel] .. '</td>'
 
     strings = strings .. '<td style="text-align: center; background-color: #d9d9d9;">' .. aircraftTotal .. '</td>'
 
     strings = strings .. '<td style="text-align: center; background-color: #d9d9d9;">' .. aircraftTotal .. '</td>'
 
     strings = strings .. '<td style="text-align: center; background-color: #aaffff;">' .. shipmodule.data[id]["spd"] .. '</td>'
 
     strings = strings .. '<td style="text-align: center; background-color: #aaffff;">' .. shipmodule.data[id]["spd"] .. '</td>'
5,421

edits