Module:Character/class
From Semantic MediaWiki - Sandbox
This holds the configuration for Module:Character/class.
Usage
local config = mw.loadData( 'Module:Character/config' )
local config = mw.loadData( 'Module:Character/config' )
local class = require( 'Module:SSC base' )
local character = class:new( config )
function character:setDefaults( data )
local data = data
data.name = data.name or mw.title.getCurrentTitle().text
return data
end
function character:alterDataAfterStorage( data )
local data = data
if data['wikipedia page'] then
data['wikipedia page'] = '[' .. data['wikipedia page'] .. ' ' .. data.name .. ']'
end
return data
end
return character