Module:ItemTables: Difference between revisionsGive feedback
Jump to navigation
Jump to search
m quick fix for wrong name |
setup initial search crawl |
||
| Line 77: | Line 77: | ||
p.itemPropTable = function(frame) | p.itemPropTable = function(frame) | ||
local | local TableValues = {} | ||
local | local listofItems = "" | ||
local property = frame.args[ | local property = frame.args[1] | ||
local item = get_json_item(item_name) | -- local item = get_json_item(item_name) | ||
if(item == nil) then return "Item Not Found" end | -- if(item == nil) then return "Item Not Found what" end | ||
for | for internalName, statName in pairs(data) do --statName is the key. go through whole table. in this case itemName can be upgrade_improved_stamina | ||
if(statName[property] ~= nil) then | |||
listofItems = listofItems .. statName["Name"] .. "<br/>" | |||
-- TableValues = table.insert(TableValues, statName["Name"]) -- i may want to make a table first, so it includes weapon and cost to make it sortable. | |||
end | end | ||
return table.concat( | |||
end | |||
end | return listofItems | ||
return item[property] | --return table.concat(TableValues, ", ") | ||
--for i,v in pairs(data) do | |||
-- if(type(item[property]) == "table") then | |||
-- for i,v in pairs(item[property]) do | |||
-- if(v == property) then | |||
-- TableValues = table.insert(TableValues, item["Name"]) | |||
-- end | |||
-- end | |||
-- return table.concat(TableValues, ", ") | |||
-- end | |||
--end | |||
--return item[property] | |||
--return tableValues[property] | --return tableValues[property] | ||
end | end | ||
return p | return p | ||