FANDOM


--WARFRAME Wiki Void Drop Table
--http://warframe.wikia.com/
--Written by User:ChickenBar
 
local p = {}
 
local VoidData = mw.loadData( 'Module:Void/data' )
local script = require( "Module:Icon" )
 
function p.mission( frame )
    local platform = frame.args[1]
    local mission_tier = frame.args[2]
    local mission_type = frame.args[3]
    local rewards = {}
    local i=1
    while VoidData[platform][i] ~= nil do
        if (VoidData[platform][i][1] == mission_tier) and (VoidData[platform][i][2] == mission_type) then
            local span = mw.html.create('span')
            :css('background','rgba(179,196,230,0.3)')
            :css('display','inline-block')
            :css('border','1px solid white')
            :css('padding','2px 2px')
            :css('margin-bottom','4px')
            :css('white-space','nowrap')
            :wikitext(script._Prime(VoidData[platform][i][3], VoidData[platform][i][4], "x18")):done()
            table.insert(rewards, tostring(span))
        end
        i=i+1
    end
    return table.concat(rewards," ")
end
 
 
function p.item( frame )
    local platform = frame.args[1]
    local item_type = string.upper(frame.args[2])
    local item_part = string.upper(frame.args[3])
    local locations = {}
    local i=1
    while VoidData[platform][i] ~= nil do
        if (VoidData[platform][i][3] == item_type) and (VoidData[platform][i][4] == item_part) then
            table.insert(locations, VoidData[platform][i][1].." "..VoidData[platform][i][2])
        end
        i=i+1
    end
    return table.concat(locations, "<br/>")
end
 
return p