Module:Equipment

local p = {} local equipmentData = mw.loadData( 'Module:Equipment/data' )

function p.type( frame ) local eqmName = frame.args[1]; local eqmType = frame.args[2]; if equipmentData[eqmName] ~= nil then if equipmentData[eqmName][eqmType] ~= nil then return equipmentData[eqmName][eqmType] else return ' Error: equipmentData[eqmName] ' end else return ' Error: equipmentData[eqmName] ' end end

function p.image( frame ) local eqmName = frame.args[1]; local eqmImage = frame.args[2]; if equipmentData[eqmName] ~= nil then if equipmentData[eqmName][eqmImage] ~= nil then return equipmentData[eqmName][eqmImage] else return 'e'		end else return 'e'   end end

function p.sreffect( frame ) local eqmName = frame.args[1]; local eqmSReffect = frame.args[2]; if equipmentData[eqmName] ~= nil then if equipmentData[eqmName][eqmSReffect] ~= nil then return equipmentData[eqmName][eqmSReffect] else return ' Error! '		end else return ' Error! '   end end

function p.ssreffect( frame ) local eqmName = frame.args[1]; local eqmSSReffect = frame.args[2]; if equipmentData[eqmName] ~= nil then if equipmentData[eqmName][eqmSSReffect] ~= nil then return equipmentData[eqmName][eqmSSReffect] else return ' Error! '		end else return ' Error! '   end end

function p.ureffect( frame ) local eqmName = frame.args[1]; local eqmUReffect = frame.args[2]; if equipmentData[eqmName] ~= nil then if equipmentData[eqmName][eqmUReffect] ~= nil then return equipmentData[eqmName][eqmUReffect] else return ' Error! '		end else return ' Error! '   end end return p