Module:Sandbox/Paradox-

-- local p = {}

local data = require("Module:Sandbox/Paradox-/Data") local all_items = data.items

-- Count function p.ItemCount local count = 0 for i in pairs(all_items) do       count = count + 1 end return count end

-- Infobox local infobox_item = [=[]=]

function p.InfoboxItem(frame) local name = frame.args[1] local item = all_items[name] return string.format(infobox_item,       name,        name .. ".png",        item.Rarity or "",        item.Effect or "",        item.Unlock or "",        item.ID or ""    ) end

-- Table local table_head = [=[{| class="article-table sortable" ! style="background-color:#282828;text-align:center" | Item ! style="background-color:#282828;text-align:center" class="unsortable" | Effect ! style="background-color:#282828;text-align:center" class="unsortable" | Initial Effect ! style="background-color:#282828;text-align:center" class="unsortable" | Stacking Effect ! style="background-color:#282828;text-align:center" class="unsortable" | Effective Maximum Amount ]=]

local table_row = [=[|- ]=]
 * style="text-align:center;white-space:nowrap" data-sort-value="%s" | %s.png%s
 * %s
 * %s
 * %s
 * %s

function p.Table(frame) local table = table_head for name, item in pairs(all_items) do       table = table .. string.format(table_row,           name, name, name, name,            item.Effect,            item.Stack.Init,            item.Stack.Add,            item.Stack.Max        ) end table = table .. "|}"   return table end return p --