Module:Extracted: Difference between revisions

From Heroes 3 wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
function p.extracted(frame)
function p.extracted(frame)
if frame.args['start'] then
if frame.args['start'] then
return frame.args['start']
return ''
end
end
if frame.args['end'] then
if frame.args['end'] then
return frame.args['end']
return '[[Template:Extracted]]'
end
end
size = '50px'
size = '50px'

Revision as of 20:19, 11 January 2024

{{#invoke:extracted|extracted|filename.png}}


local p = {} --p stands for package

function p.extracted(frame)
	if frame.args['start'] then
		return ''
	end
	if frame.args['end'] then
		return '[[Template:Extracted]]'
	end
	size = '50px'
	if  mw.title.getCurrentTitle().text == 'Extracted/Sprites/Campaign' then
		size = '1px'	
	end
	return '[[file:' .. frame.args[1] .. '|' .. size .. ']]'
end

return p