• 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
Line 24: Line 24:  
|style="background-color:#eef2f7;font-size:18px"|%s
 
|style="background-color:#eef2f7;font-size:18px"|%s
 
|style="background-color:#eef2f7;font-size:18px"|%s]=],
 
|style="background-color:#eef2f7;font-size:18px"|%s]=],
item_style = [=[|-
+
item_row_choice_top = [=[|-
|data-sort-value="%s" style="background-color:#eef2f7;color:red;font-size:12px;line-height:14px;width:auto;border-bottom:4px solid grey;border-top:4px solid grey"|]=],
+
|data-sort-value="%s" style="background-color:#eef2f7;font-size:12px;line-height:14px;border-top:4px solid grey"|%s<br>[[%s]]]=],
item_amount_style = [=[
+
item_row_choice_middle = [=[|-
|style="background-color:#eef2f7;font-size:18px;border-bottom:4px solid grey;border-top:4px solid grey"|]=],
+
|data-sort-value="%s" style="background-color:#eef2f7;font-size:12px;line-height:14px;"|%s<br>[[%s]]]=],
 +
item_row_choice_bottom = [=[|-
 +
|data-sort-value="%s" style="background-color:#eef2f7;font-size:12px;line-height:14px;border-bottom:4px solid grey"|%s<br>[[%s]]]=],
 +
item_row_amount_top    = [=[|style="background-color:#eef2f7;font-size:18px;border-top:4px solid grey"|%s]=],
 +
item_row_amount_middle = [=[|style="background-color:#eef2f7;font-size:18px;"|%s]=],
 +
item_row_amount_bottom = [=[|style="background-color:#eef2f7;font-size:18px;border-bottom:4px solid grey"|%s]=],
 +
item_style_top    = [=[|data-sort-value="%s" style="background-color:#eef2f7;color:red;font-size:12px;line-height:14px;width:auto;border-top:4px solid grey"|]=],
 +
item_style_bottom = [=[|data-sort-value="%s" style="background-color:#eef2f7;color:red;font-size:12px;line-height:14px;width:auto;border-bottom:4px solid grey"|]=],
 
}
 
}
   Line 128: Line 135:  
local names = U.split(name, '||')
 
local names = U.split(name, '||')
 
 
local reward = {}
+
local subNames = {}
 +
for j=1, #names do
 +
subNames[j] = names[j]:sub(1, -2)
 +
end
 +
 
local difficulty = {'Casual', 'Easy', 'Medium', 'Hard'}
 
local difficulty = {'Casual', 'Easy', 'Medium', 'Hard'}
 
 
--Output the reward items
  −
table.insert(result, template.item_style)
  −
local str = "%s"
   
for c=1, #names do
 
for c=1, #names do
if c>1 then str = str .. " OR %s " end
+
local str = ""
str = string.format(str, getAsset(names[c]:sub(1, -2)))
+
 +
if     c==1     then str = template.item_row_choice_top
 +
elseif  c==#names then str = template.item_row_choice_bottom
 +
else            str = template.item_row_choice_middle end
 +
table.insert(result, string.format(str, 0, getAsset(subNames[c]), subNames[c]))
 +
 +
str = ""
 +
for d=1, #difficulty do
 +
if      c==1      then str = template.item_row_amount_top
 +
elseif  c==#names then str = template.item_row_amount_bottom
 +
else            str = template.item_row_amount_middle end
 +
table.insert(result, string.format(str, getCell(name, difficulty[d], c), c))
 +
end
 +
 +
if c~=#names then table.insert(result, template.choice) end
 
end
 
end
table.insert(result, str)
   
 
--Output the amounts of reward for each difficulty & item
  −
for d=1, #difficulty do
  −
str = template.item_amount_style .. "%s "
  −
for c=1, #names do
  −
if c>1 then if getCell(name, difficulty[d], c) == '' then str = str .. " %s " else str = str .. " / %s " end end
  −
if getCell(name, difficulty[d], c) == '' then str = string.format(str, "") else str = string.format(str, getCell(name, difficulty[d], c)) end
  −
end
  −
table.insert(result, str)
  −
end
   
else
 
else
 
table.insert(result, string.format(template.item_row, 0, getAsset(name), name,
 
table.insert(result, string.format(template.item_row, 0, getAsset(name), name,
1,031

edits

Navigation menu