Module:Cg

local p = {}

p.cg = function(f) local args = f.args or f	if f == mw.getCurrentFrame and args[1] == nil then args = f:getParent.args else f = mw.getCurrentFrame end local type = args["1"] or args["type"] if type == "cell" then local grids = args["2"] if grids ~= nil then return "" .. grids .. " "		else return " " end elseif type == "tank" then local ret = "" .. (args["2"] or "") if args["nooverlay"] == nil then ret = ret .. "[[File:GUI tank"			if args["width"] ~= nil then				ret = ret .. "_" .. args["width"]			end			ret = ret .. "_" .. (args["height"] or "120") .. ".png|link=]] " end return ret .. " "	elseif type == "text" then return "" .. (args["2"] or "") .. (args["3"] or "") .. (args["4"] or "") .. " "	elseif type == "shapeless" then return " " elseif type == "end" then return " " elseif type == "image" then return "" .. (args["2"] or "") .. " "	elseif type == "bg-image" then elseif type == "progress" then else end end

return p