Module:Illustration: Difference between revisions

From Terra Invicta Official Wiki
Llamageddon (talk | contribs)
Working on getting illustations doing whotsits and thingies in a seperate module here. Very rough draft for now...
 
Llamageddon (talk | contribs)
mNo edit summary
Line 16: Line 16:
end
end
end
end
returnString = returnString .. 'Illustrations: ' .. tconcat(Illustrations, ' , ')
local returnString = 'Illustrations: '
returnString = returnString .. tconcat(Illustrations, ' , ')
returnString = returnString .. 'Did this work?'
returnString = returnString .. 'Did this work?'
end
end

Revision as of 05:46, 8 December 2025

Documentation for this module may be created at Module:Illustration/doc

-- This is meant to be a way to reference and use the illustrations in the game easily on the wiki and inside other templates.
-- No idea what I'm doing really, and need a break, so just leaving whatever this is here for now.

local p = {}

local illusData = mw.loadData('Module:Illustration/data')

function p.Illusnametest (frame)
	local illusdataName = frame.args[1]
	if illusdataName[illusData] then
		local Illustrations = {}
		for j = 0, 5 do
			local illusFile = {}
			if illusData[illusdataName][j] and illusData[illusdataName][j] ~= '' then
				tinsert(Illustrations,illusData[illusFile][j])
			end
		end
		local returnString = 'Illustrations: '
		returnString = returnString .. tconcat(Illustrations, ' , ')
		returnString = returnString .. 'Did this work?'
	end
end

return p