Line 7: |
Line 7: |
| -- * Module:View/Table for table UI tree construction | | -- * Module:View/Table for table UI tree construction |
| | | |
− | local table_header = [=[{|style="width:100%;text-align:center" | + | local table_header = [=[{|style="width:100%;text-align:center" cellspacing="0" |
| |style="width:4%"|ID | | |style="width:4%"|ID |
− | |style="width:{{{requirements_width|35%}}}"|Requirements | + | |style="width:35%"|Requirements |
| |style="width:0.5%"| | | |style="width:0.5%"| |
| |style="width:20%"|[[File:Fuel.png|30px|link=Tutorial: FAQ#How do resources work in this game?]][[File:Ammunition.png|30px|link=Tutorial: FAQ#How do resources work in this game?]][[File:Steel.png|30px|link=Tutorial: FAQ#How do resources work in this game?]][[File:Bauxite.png|30px|link=Tutorial: FAQ#How do resources work in this game?]] | | |style="width:20%"|[[File:Fuel.png|30px|link=Tutorial: FAQ#How do resources work in this game?]][[File:Ammunition.png|30px|link=Tutorial: FAQ#How do resources work in this game?]][[File:Steel.png|30px|link=Tutorial: FAQ#How do resources work in this game?]][[File:Bauxite.png|30px|link=Tutorial: FAQ#How do resources work in this game?]] |
Line 32: |
Line 32: |
| |${note}]=] | | |${note}]=] |
| | | |
− | local function render(args) | + | local function render(args, frame) |
| local category = args.explicit[1] | | local category = args.explicit[1] |
| local data = Data.load('Quest', category) | | local data = Data.load('Quest', category) |
Line 38: |
Line 38: |
| table.insert(result, table_header) | | table.insert(result, table_header) |
| for i, q in ipairs(data) do | | for i, q in ipairs(data) do |
| + | q.reward_other = frame:preprocess(q.reward_other) |
| table.insert(result, _.format(table_row, q)) | | table.insert(result, _.format(table_row, q)) |
| end | | end |
Line 44: |
Line 45: |
| end | | end |
| | | |
− | return View(render) | + | return { |
| + | t = function() |
| + | local data = Data.load('Quest', 'Composition') |
| + | return _.format(table_row, data[1]) |
| + | end |
| + | } |