Module:Media

local p = {} local image = require("Module:image") local utils = require("Module:utils") local media = {}

-- Returns whether there are images of that type provided. function p.CheckForType(typeToCheck) local result = false local games = utils.GetGames("all") for key, value in pairs(games) do if media[typeToCheck .. " " .. value] ~= nil then result = true end end return result end

-- Template:Media function p.Main(frame) media = frame:getParent.args local hasArtworks = p.CheckForType("Artwork") local hasRenders = p.CheckForType("Render") local hasModels = p.CheckForType("Model") local hasSprites = p.CheckForType("Sprite") end

return p