Module:Images

local p = {} local data = mw.loadData( 'Module:Images/data' ) -- Used to get enemy icons based on name function p.enemyIcons( frame ) local text = frame.args[1] local image = frame.args[2] if image ~= nil and image ~= '' then text = image elseif data["enemyIcons"][text] ~= nil then text = data["enemyIcons"][text] end return text end -- Creates stats bar (health, stamin, etc.) function p.statsBars( frame ) local stat = frame.args[1] if stat ~= nil then stat = tonumber(stat) -- Value was not number so use it instead of bar if stat == nil then return frame.args[1] end else stat = 0 end return data["statsBar"][stat] end function p.heroUniforms( frame ) local hero = frame:getParent.args[1] if hero == nil then hero = "Iron Man" end local links = require("Module:Link") local hero_link = links.heroLinkArg(hero) local uniform = frame:getParent.args['uniforms'] local s = "" if uniform ~= nil then for i in string.gmatch(uniform, "%w+") do     s = s.."" end else s = "" end return s end function p.empowered(frame) local eiso = frame.args[1] if data["eiso"][eiso] ~= nil then eiso = data["eiso"][eiso] end return eiso end function p.augmented(frame) local name = frame.args[1] local number = frame.args[2] if data["aiso"][name] ~= nil then aiso = data["aiso"][name] else aiso = name.." "..number end return aiso end return p