Module:Character: Difference between revisions
From The Coffin of Andy and Leyley
(Created page with "local capiunto = require 'capiunto' capiunto.create( { title = 'Title of the Infobox' } ) :addRow( 'A label', 'some data' ) :addHeader( 'A header between the data rows' ) :addRow( 'Another label', {...} )") |
(Add Character Module) |
||
Line 1: | Line 1: | ||
local capiunto = require 'capiunto' | local capiunto = require 'capiunto' | ||
capiunto.create( { | |||
local p = {} | |||
:addRow( ' | function p.main(frame) | ||
:addHeader( ' | local args = frame:getParent().args | ||
:addRow( ' | local retval = capiunto.create( { | ||
title = args.name, | |||
} ) | |||
retval:addImage( args.image, args.imagecaption ) | |||
retval:addRow( 'Aliases', args.aliases ) | |||
retval:addRow( 'Relatives', args.relatives ) | |||
retval:addRow( 'Other', args.other ) | |||
retval:addRow( 'Affiliation', args.affilication ) | |||
retval:addRow( 'Occupation', args.occupation ) | |||
retval:addHeader( 'Biographical information' ) | |||
retval:addRow( 'Status', args.status ) | |||
retval:addRow( 'Marital Status', args.marital ) | |||
retval:addRow( 'Age', args.age ) | |||
retval:addRow( 'Date of birth', args.birthDate ) | |||
retval:addRow( 'Place of birth', args.birthPlace ) | |||
retval:addRow( 'Date of death', args.deathDate ) | |||
retval:addRow( 'Place of death', args.deathPlace ) | |||
retval:addHeader( 'Physical description' ) | |||
retval:addRow( 'Species', args.species ) | |||
retval:addRow( 'Gender', args.gender ) | |||
retval:addRow( 'Height', args.height ) | |||
retval:addRow( 'Weight', args.weight ) | |||
retval:addRow( 'Eye Color', args.eyes ) | |||
retval:addHeader( 'General Information' ) | |||
retval:addRow( 'Crime(s)', args.crimes ) | |||
retval:addRow( 'Equipment', args.equipment ) | |||
return retval | |||
end | |||
return p |
Revision as of 03:41, 1 January 2024
Documentation for this module may be created at Module:Character/doc
local capiunto = require 'capiunto'
local p = {}
function p.main(frame)
local args = frame:getParent().args
local retval = capiunto.create( {
title = args.name,
} )
retval:addImage( args.image, args.imagecaption )
retval:addRow( 'Aliases', args.aliases )
retval:addRow( 'Relatives', args.relatives )
retval:addRow( 'Other', args.other )
retval:addRow( 'Affiliation', args.affilication )
retval:addRow( 'Occupation', args.occupation )
retval:addHeader( 'Biographical information' )
retval:addRow( 'Status', args.status )
retval:addRow( 'Marital Status', args.marital )
retval:addRow( 'Age', args.age )
retval:addRow( 'Date of birth', args.birthDate )
retval:addRow( 'Place of birth', args.birthPlace )
retval:addRow( 'Date of death', args.deathDate )
retval:addRow( 'Place of death', args.deathPlace )
retval:addHeader( 'Physical description' )
retval:addRow( 'Species', args.species )
retval:addRow( 'Gender', args.gender )
retval:addRow( 'Height', args.height )
retval:addRow( 'Weight', args.weight )
retval:addRow( 'Eye Color', args.eyes )
retval:addHeader( 'General Information' )
retval:addRow( 'Crime(s)', args.crimes )
retval:addRow( 'Equipment', args.equipment )
return retval
end
return p