PC Gaming Shelter
An archive dedicated to preserving PC Gaming history and more

Module:Skin: Difference between revisions

From PC Gaming Shelter
Created page with "local utils = require( 'Module:Utils' ) local p = {} local function propertiesPlan() -- ['Form field name'] = { 'Semantic property', 'delimiter' } local propMap = { ['Image'] = {'Image', 'file' }, ['Related game'] = {'Related game' }, ['Has skin type'] = {'Has skin type' }, ['Has developer'] = {'Has developer', ',' }, ['Has release date'] = {'Has release date' }, ['Has short description'] = {'Has short descripti..."
 
No edit summary
 
Line 27: Line 27:
},
},
['Mod Info'] = {
['Mod Info'] = {
heading = 'Map Info',
heading = 'Skin Info',
template = 'Infobox/Map Info',
template = 'Infobox/Skin Info',
order = '2',
order = '2',
rows = {
rows = {

Latest revision as of 15:34, 16 June 2026

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

local utils = require( 'Module:Utils' )

local p = {}

local function propertiesPlan()
	-- ['Form field name'] = { 'Semantic property', 'delimiter' }
	local propMap = {
		['Image']               	= {'Image', 'file' },
		['Related game']        	= {'Related game' },
		['Has skin type']        	= {'Has skin type' },
		['Has developer']       	= {'Has developer', ',' },
		['Has release date']    	= {'Has release date' },
		['Has short description']   = {'Has short description' }
	}
	return propMap
end

local function infoboxSectionPlan()
	local sectionMap = {
		['Cover image'] = {
			heading = '',
			template = 'Infobox/Cover',
			order = '1',
			rows = {
				'Image'
			}
		},
		['Mod Info'] = {
			heading = 'Skin Info',
			template = 'Infobox/Skin Info',
			order = '2',
			rows = {
				'Related game',
				'Has skin type',
				'Has developer',
				'Has release date',
				'Has short description'
			}
		},
		['Download'] = {
			heading = '<i class="fas fa-link mr-2"></i> Links',
			template = 'Infobox/Download',
			order = '3',
			rows = {
				'Download links'
			}
		}
	}
	return sectionMap
end

function p.infobox(frame)
	local category   = 'Skins'
	local properties = propertiesPlan()
	local sections   = infoboxSectionPlan()
	local footer     = ''
	local infobox    = utils.createInfobox(frame, category, properties, sections, footer)
	return infobox
end

return p