Module:Vendors

local p = {}

--All information of the current xur items --This table is updated by User:DestinyWikiBot. DO NOT change any comments containing the HTML tag: local vendor_table = { --   ["xur"] = { ["status"] = "True", ["curios"] = { [1] = {"Heavy\ Ammo\ Synthesis", "Heavy\_Ammo\_Synthesis\_icon\.jpg"}, [2] = {"Heavy\ Ammo\ Synthesis", "Heavy\_Ammo\_Synthesis\_icon\.jpg"}, [3] = {"Glass\ Needles", "GlassNeedles\.jpg"}, [4] = {"Plasma\ Drive", "Plasma\_Drive\_icon\.jpg"}, [5] = {"Stealth\ Drive", "Stealth\_Drive\_icon\.jpg"} },       ["material exchange"] = { [1] = {"Mote\ of\ Light", "Mote\_of\_Light\_icon\.jpg"}, [2] = {"Exotic\ Shard", "Exotic\_Shard\_icon\.jpg"} },       ["exotic gear"] = { [1] = {"SUROS\ Regime", "SUROS\ Regime\ icon\.jpg"}, [2] = {"Crest\ of\ Alpha\ Lupi", "Crest\_of\_Alpha\_Lupi\_icon\.jpg"}, [3] = {"Don\'t\ Touch\ Me", "Don\'t\_Touch\_Me\_icon\.jpg"}, [4] = {"Apotheosis\ Veil", "Apotheosis\_Veil\_icon\.jpg"}, [5] = {"Exotic\ Engram", "Legacy\_Engram\_icon\.jpg"} }   },    ["ironbanner"] = { ["status"] = "False", },   ["armsday"] = { ["status"] = "True", ["miscellaneous"] = { [1] = {"Special\ Ammo\ Synthesis", "Special\_Ammo\_Synthesis\_icon\.jpg"}, [2] = {"Heavy\ Ammo\ Synthesis", "Heavy\_Ammo\_Synthesis\_icon\.jpg"}, [3] = {"Weapon\ Parts", "Weapon\_Parts\_icon\.jpg"}, [4] = {"Armor\ Materials", "Armor\_Materials\_icon\.jpg"}, [5] = {"Primary\ Telemetry", "Primary\_Telemetry\_icon\.jpg"}, [6] = {"Special\ Telemetry", "Special\_Telemetry\_icon\.jpg"}, [7] = {"Heavy\ Telemetry", "Heavy\_Telemetry\_icon\.jpg"} },       ["field test weapons"] = { [1] = {"SUROS\ TSA\-10", "SUROS\_TSA\-10\_icon\.jpg"}, [2] = {"H\äkke\ Test\-A", "H\äkke\_Test\-A\_icon\.jpg"}, [3] = {"Omolon\ Test\ HC1", "Omolon\_Test\_HC1\_icon\.jpg"}, [4] = {"H\äkke\ Test\-A", "H\äkke\_Test\-A\_icon\.jpg"}, [5] = {"H\äkke\ Test\-A", "H\äkke\_Test\-A\_icon\.jpg"} },       ["foundry orders"] = { [1] = {"SUROS\ DIS\-43", "Omolon\_Tuonela\_SR4\_icon\.jpg"}, [2] = {"H\äkke\ Aoife\ Rua\-D", "H\äkke\_Arminius\-D\_icon\.jpg"}, [3] = {"Omolon\ Kumakatok\ HC4", "Omolon\_Eirene\_RR4\_icon\.jpg"}, [4] = {"Omolon\ Cocytus\ SR4", "Omolon\_Eirene\_RR4\_icon\.jpg"}, [5] = {"H\äkke\ Strongbow\-D", "H\äkke\_Arminius\-D\_icon\.jpg"} }   },    ["srl"] = { ["status"] = "False", }

-- }

--Main page function returns values in main page friendly format function p.vendor ( frame ) --Sets activity type (activity) and activity information key (info) from arguments. local vendorname = string.lower( frame.args[1] ) local vendortype = string.lower( frame.args[2] ) --If the activity type doesn't exist, returns false if not vendor_table[vendorname] then return "Key does not exist in vendor table. See Module:Activities." end --If activity info value is a table, parses into string format if (type(vendor_table[vendorname][vendortype]) == "table") then --Creates local string to return local string = "" --Loops through table and returns in format 20px|DESCRIPTION if (frame.args[3] == "mainpage" ) then for itemnum, iteminfo in ipairs(vendor_table[vendorname][vendortype]) do               string = string .. " " .. iteminfo[1] .. " "           end else for itemnum, iteminfo in ipairs(vendor_table[vendorname][vendortype]) do               string = string .. "* " .. iteminfo[1] .. "\n" end end return string end

--Adds returned information to global variable return vendor_table[vendorname][vendortype] end

--Returns global variable return p