Module:QuestDetails: Difference between revisions

From Brighter Shores Wiki
Jump to navigation Jump to search
Content added Content deleted
(Created page with "local p = {} local infobox = require('Module:Infobox') local parse = require('Module:Param Parse') function p.details(frame) local _args = frame:getParent().args local ret = infobox.new(_args) ret:defineParams { { name = 'start_point' }, { name = 'requirements' }, } ret:create() ret:cleanParams() ret:addClass('questdetails') ret:attr { cellspacing = '3' } local auto_width = { ["max-width"] = "85%", ["width"] =...")
 
No edit summary
Line 5:
 
function p.details(frame)
local _args = frame:getParent().args
local ret = infobox.new(_args)
local config = {
 
infobox_name = 'Quest Details',
ret:defineParams {
class = 'questdetails'
{ name = 'start_point' },
}
{ name = 'requirements' },
}
local params = {
{ name = 'start_point' },
ret:create()
{ name = 'requirements' },
ret:cleanParams()
}
 
ret:addClass('questdetails')
local ret = infoboxInfobox.new(_argsconfig, params, args)
ret:attr { cellspacing = '3' }
 

Revision as of 02:18, 13 November 2024

Module documentation
This documentation is transcluded from Module:QuestDetails/doc. [edit] [history] [purge]
This module does not have any documentation. Please consider adding documentation at Module:QuestDetails/doc. [edit]
Module:QuestDetails's function details is invoked by Template:QuestDetails.
Module:QuestDetails requires Module:Infobox.
Module:QuestDetails requires Module:Param Parse.

local p = {}

local infobox = require('Module:Infobox')
local parse = require('Module:Param Parse')

function p.details(frame)
	local _args = frame:getParent().args
	
	local config = {
		infobox_name = 'Quest Details',
		class = 'questdetails'
	}
	
	local params = {
		{ name = 'start_point' },
        { name = 'requirements' }
	}
	
    local ret = Infobox.new(config, params, args)
    ret:attr { cellspacing = '3' }

    local auto_width = { ["max-width"] = "85%", ["width"] = "auto" }
    ret:addRow {
        { tag = 'th', class = "questdetails-header", content = 'Start point' },
        { tag = 'argd', class = "questdetails-info", content=infobox.param('name'), css = auto_width }
    }

    ret:addRow {
        { tag = 'th', class = "questdetails-header", content = 'Requirements' },
        { tag = 'td', class = "questdetails-info", content=infobox.param('requirements'), colspan = 2 }
    }

	return ret    
end

return p