Module:PartTypeList
Documentation for this module may be created at Module:PartTypeList/doc
-- Module:PartTypeList
-- Generates a list of part type buttons
local p = {}
function p.list(frame)
-- Fixed list of part types
local types = {
'CRT tube',
'IC',
'Flyback transformer',
'Board',
'Yoke',
'Other'
}
-- Build the output: render each type using Template:Part type entry
local output = {}
for _, partType in ipairs(types) do
local templateCall = '{{Part type entry|type=' .. partType .. '}}'
table.insert(output, frame:preprocess(templateCall))
end
return table.concat(output, '\n')
end
return p