Module:ItemTables: Difference between revisionsGive feedback
Jump to navigation
Jump to search
add new column for quantity of stat increase |
remove get type function, cleanup replace, apply friendly name |
||
| Line 42: | Line 42: | ||
end | end | ||
return copy | return copy | ||
end | end | ||
| Line 75: | Line 55: | ||
for link, patterns in pairs(link_patterns) do | for link, patterns in pairs(link_patterns) do | ||
for i, v in ipairs(patterns) do | for i, v in ipairs(patterns) do | ||
local a | local a = desc:find(v) | ||
if a then | if a then desc = link break | ||
end | end | ||
end | end | ||
| Line 90: | Line 68: | ||
local listofItems = "" | local listofItems = "" | ||
local property = frame.args[1] or mw.title.getCurrentTitle().text | local property = frame.args[1] or mw.title.getCurrentTitle().text | ||
local friendlyPropertyName = property | |||
property = FriendlyNames(property) | property = FriendlyNames(property) | ||
-- local item = get_json_item(item_name) | -- local item = get_json_item(item_name) | ||
| Line 125: | Line 104: | ||
:tag('td'):wikitext(get_cost(itemName["Name"])):done() | :tag('td'):wikitext(get_cost(itemName["Name"])):done() | ||
:tag('td'):wikitext(get_type(itemName["Name"])):done() | :tag('td'):wikitext(get_type(itemName["Name"])):done() | ||
:tag('td'):wikitext(itemName[property].. " " .. | :tag('td'):wikitext("+" .. itemName[property].. " " .. friendlyPropertyName):done() | ||
table.insert(requirements, tableData) | table.insert(requirements, tableData) | ||