Module:EnvironmentTooltip

---	EnvironmentTooltip create environment tooltip. --	--	@module		environmenttooltip --	@alias		p --	@author		User:Thundermaker300 --	@attribution	All who helped to update environment infoboxes --	@require	Module:Environments/Data --	@release	stable --	 local p = {}

local EnvData = mw.loadData('Module:Environments/Data').Environments

local tooltip_template = ' ' .. ' ' ..                             ' %s ' .. '' ..                           ' ' ..                            ' ' ..                              '%s%s %s   %s' .. ' ' ..                         ' '

local env_display = "%s  %s"

---	Creates an environment tooltip. --	@function		p.Tooltip --	@param			{table} frame Frame object --	@return			{string} Preprocessed wikitext of resultant link function p.Tooltip(frame) local data = EnvData[frame.args[1]] if data == nil then return error("EnvironmentTooltip.Tooltip(frame): Invalid environment!") end local str = string.format(		tooltip_template,		data.Image and "" or "",		data.Expansion and "" or "",		data.Name or "Unknown",		data.SubName or "Unknown",		string.format(env_display, data.LunarSeer or "", data.Description or "" )	)	return frame:preprocess(str) end

return p