Changes

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_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"|]=],
|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"|]=],
+
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"|]=],
 +
item_style_both  = [=[|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"|]=],
 
item_amount_style = [=[
 
item_amount_style = [=[
 
|style="background-color:#eef2f7;font-size:18px;border-bottom:4px solid grey;border-top:4px solid grey"|]=],
 
|style="background-color:#eef2f7;font-size:18px;border-bottom:4px solid grey;border-top:4px solid grey"|]=],
 +
inner_table_header = [=[|-
 +
|
 +
{|style="text-align:center;width:100%"]=],
 +
or_style = [=[|rowspan="2"style="background-color:#eef2f7;color:red"|OR]=],
 +
item_link = [=[[[%s]]]=],
 
}
 
}
   Line 131: Line 137:  
local difficulty = {'Casual', 'Easy', 'Medium', 'Hard'}
 
local difficulty = {'Casual', 'Easy', 'Medium', 'Hard'}
 
 
--Output the reward items
+
--Output the reward items as a table inside the cell
table.insert(result, template.item_style)
+
table.insert(result, template.inner_table_header)
 
local str = "%s"
 
local str = "%s"
 
for c=1, #names do
 
for c=1, #names do
if c>1 then str = str .. " OR %s " end
+
if c>1 then table.insert(result, template.or_style) end
str = string.format(str, getAsset(names[c]:sub(1, -2)))
+
table.insert(result, template.item_style_top)
 +
table.insert(result, getAsset(names[c]:sub(1, -2)))
 
end
 
end
table.insert(result, str)
+
table.insert(result, "|-")
 +
for c=1, #names do
 +
table.insert(result, template.item_style_bottom)
 +
table.insert(result, string.format(template.item_link, names[c]:sub(1, -2)))
 +
end
 +
table.insert(result, template.footer)
 
 
 
--Output the amounts of reward for each difficulty & item
 
--Output the amounts of reward for each difficulty & item
1,034

edits