Module:Game: Difference between revisions
From NOISZ Wiki
RiceEmpress (talk | contribs) (Created page with "local capiunto = require 'capiunto' local p = {} function p.main(frame) local args = frame:getParent().args local infobox = capiunto.create( { title1 = args.title } ) :addImage('200px', args.caption ) local rows = { { 'Developer', args.developer }, { 'Publisher', args.publisher }, { 'Engine', args.engine }, { 'Version', args.version }, { 'Platform', args.platform }, { 'Release Date', args.releasedate }, { 'Age',...") |
RiceEmpress (talk | contribs) No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 4: | Line 4: | ||
local args = frame:getParent().args | local args = frame:getParent().args | ||
local infobox = capiunto.create( { | local infobox = capiunto.create( { | ||
title1 = | title1 = {{PAGENAME}} | ||
} ) | } ) | ||
:addImage('[[File:' .. args. | :addImage('[[File:' .. args.image .. '|200px]]', args.caption ) | ||
local rows = | local rows = | ||
{ | { | ||
Latest revision as of 08:37, 3 June 2025
Documentation for this module may be created at Module:Game/doc
local capiunto = require 'capiunto'
local p = {}
function p.main(frame)
local args = frame:getParent().args
local infobox = capiunto.create( {
title1 = {{PAGENAME}}
} )
:addImage('[[File:' .. args.image .. '|200px]]', args.caption )
local rows =
{
{ 'Developer', args.developer },
{ 'Publisher', args.publisher },
{ 'Engine', args.engine },
{ 'Version', args.version },
{ 'Platform', args.platform },
{ 'Release Date', args.releasedate },
{ 'Age', args.age },
{ 'Genre', args.genre },
{ 'Mode', args.mode },
{ 'Languages', args.languages },
{ 'Rating', args.rating },
{ 'Media', args.media },
{ 'System Requirements', args.requirements}
}
for _, row in ipairs(rows) do
local label, value = row[1], row[2]
if value then
infobox:addRow(label, value)
end
end
return infobox
end
return p