Module:Senki

local p = {} local shipData = mw.loadData( 'Module:Senki/data' )

function p.rarity( frame ) local shipName = frame.args[1]; local shipRarity = frame.args[2]; if shipData[shipName] ~= nil then if shipData[shipName][shipRarity] ~= nil then return shipData[shipName][shipRarity] else return 'Senki does not exist' end else return '' end end

function p.class( frame ) local shipName = frame.args[1]; local shipClass = frame.args[2]; if shipData[shipName] ~= nil then if shipData[shipName][shipClass] ~= nil then return shipData[shipName][shipClass] else return 'Senki does not exist' end else return '' end end

function p.faction( frame ) local shipName = frame.args[1]; local shipFaction = frame.args[2]; if shipData[shipName] ~= nil then if shipData[shipName][shipFaction] ~= nil then return shipData[shipName][shipFaction] else return 'Senki does not exist' end else return '' end end

return p