Module:QuestDetails: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
function p.details(frame) |
function p.details(frame) |
||
local args = frame.args |
local args = frame.args |
||
local mw = require('mw') |
|||
if args.start_point then |
|||
local params = {} |
|||
⚫ | |||
["start_point"] = args.start_point, |
|||
⚫ | |||
}) |
|||
end |
|||
⚫ | |||
⚫ | |||
mw.smw.set({ |
|||
["requirements"] = args.requirements, |
|||
}) |
|||
end |
|||
if args.recommended then |
|||
mw.smw.set({ |
|||
["recommended"] = args.recommended, |
|||
}) |
|||
end |
|||
if args.enemies then |
|||
mw.smw.set({ |
|||
["enemies"] = args.enemies, |
|||
}) |
|||
end |
|||
local requirements; |
local requirements; |
||
if (args |
if (args.requirements) then |
||
requirements = args |
requirements = args.requirements |
||
else |
else |
||
requirements = 'None' |
requirements = 'None' |
||
Line 51: | Line 67: | ||
:done() |
:done() |
||
if (args |
if (args.recommended) then |
||
table |
table |
||
:tag( 'tr' ) |
:tag( 'tr' ) |
||
Line 62: | Line 78: | ||
:tag( 'td' ) |
:tag( 'td' ) |
||
:tag('p') |
:tag('p') |
||
:wikitext( args |
:wikitext( args.recommended ) |
||
:done() |
:done() |
||
:attr('style', 'max-width:85%; width:auto; padding-left: 1em; padding-right: 2em;') |
:attr('style', 'max-width:85%; width:auto; padding-left: 1em; padding-right: 2em;') |
||
Line 69: | Line 85: | ||
end |
end |
||
if (args |
if (args.enemies) then |
||
table |
table |
||
:tag( 'tr' ) |
:tag( 'tr' ) |
||
Line 80: | Line 96: | ||
:tag( 'td' ) |
:tag( 'td' ) |
||
:tag('p') |
:tag('p') |
||
:wikitext( args |
:wikitext( args.enemies ) |
||
:done() |
:done() |
||
:attr('style', 'max-width:85%; width:auto; padding-left: 1em; padding-right: 2em;') |
:attr('style', 'max-width:85%; width:auto; padding-left: 1em; padding-right: 2em;') |