Editing Module:QuestDetails
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 2: | Line 2: | ||
function p.details(frame) |
function p.details(frame) |
||
local args = frame |
local args = frame.args |
||
local mw = require('mw') |
|||
local params = {} |
|||
if args.start_point then |
|||
⚫ | |||
⚫ | |||
params['requirements'] = 'value2' |
|||
⚫ | |||
⚫ | |||
end |
|||
if args.required_for then |
|||
mw.smw.set({ |
|||
["required_for"] = args.required_for, |
|||
}) |
|||
end |
|||
if args.next_quest then |
|||
mw.smw.set({ |
|||
["next_quest"] = args.next_quest, |
|||
}) |
|||
end |
|||
if args.requirements then |
|||
mw.smw.set({ |
|||
["requirements"] = '\n'..args.requirements, |
|||
}) |
|||
end |
|||
if args.items then |
|||
mw.smw.set({ |
|||
["items"] = '\n'..args.items, |
|||
}) |
|||
end |
|||
if args.recommended then |
|||
mw.smw.set({ |
|||
["recommended"] = '\n'..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 57: | Line 26: | ||
:wikitext('Start Point') |
:wikitext('Start Point') |
||
:done() |
:done() |
||
:attr('style', 'vertical-align:top; width:15%; padding: 1em;') |
:attr('style', 'vertical-align:top; width:15%; padding: 0 1em;') |
||
:done() |
:done() |
||
:tag( 'td' ) |
:tag( 'td' ) |
||
Line 67: | Line 36: | ||
:done() |
:done() |
||
if (args.required_for) then |
|||
table |
|||
⚫ | |||
⚫ | |||
:tag( 'b' ) |
|||
:wikitext('Required for') |
|||
:done() |
|||
⚫ | |||
:done() |
|||
:tag( 'td' ) |
|||
:tag('div') |
|||
:newline() |
|||
:wikitext( args.required_for ) |
|||
⚫ | |||
:done() |
|||
:done() |
|||
end |
|||
table |
|||
:tag( 'tr' ) |
:tag( 'tr' ) |
||
:tag( 'td' ) |
:tag( 'td' ) |
||
⚫ | |||
:tag( 'b' ) |
:tag( 'b' ) |
||
:wikitext('Requirements') |
:wikitext('Requirements') |
||
:done() |
:done() |
||
⚫ | |||
:done() |
:done() |
||
:tag( 'td' ) |
:tag( 'td' ) |
||
⚫ | |||
:attr('style', 'max-width:85%; width:auto; padding: 0.3em;') |
|||
: |
:wikitext( requirements ) |
||
: |
:done() |
||
⚫ | |||
:newline() |
|||
:wikitext(requirements) |
|||
:newline() |
|||
:done() |
|||
:done() |
:done() |
||
:done() |
:done() |
||
if (args |
if (args['recommended']) then |
||
table |
table |
||
:tag( 'tr' ) |
:tag( 'tr' ) |
||
:tag( 'td' ) |
:tag( 'td' ) |
||
:attr('style', 'vertical-align:top; width:15%; padding: 1em;') |
|||
:tag( 'b' ) |
:tag( 'b' ) |
||
:wikitext(' |
:wikitext('Recommended') |
||
:done() |
:done() |
||
⚫ | |||
:done() |
:done() |
||
:tag( 'td' ) |
:tag( 'td' ) |
||
⚫ | |||
:attr('style', 'max-width:85%; width:auto; padding: 0.3em;') |
|||
: |
:wikitext( args['recommended'] ) |
||
:addClass('lighttable checklist') |
|||
:newline() |
|||
:wikitext(args.items) |
|||
:newline() |
|||
:done() |
|||
:done() |
|||
:done() |
|||
end |
|||
if (args.recommended) then |
|||
table |
|||
:tag( 'tr' ) |
|||
:tag( 'td' ) |
|||
:tag( 'b' ) |
|||
:wikitext('Recommended') |
|||
:done() |
:done() |
||
:attr('style', 'max-width:85%; width:auto; padding-left: 1em; padding-right: 2em;') |
|||
:done() |
|||
:tag( 'td' ) |
|||
:attr('style', 'max-width:85%; width:auto; padding-left: 1em;') |
|||
:tag('div') |
|||
:addClass('lighttable checklist') |
|||
:newline() |
|||
:wikitext( args.recommended ) |
|||
:newline() |
|||
:done() |
:done() |
||
:done() |
:done() |
||
end |
end |
||
if (args |
if (args['enemies']) then |
||
table |
table |
||
:tag( 'tr' ) |
:tag( 'tr' ) |
||
Line 152: | Line 76: | ||
:wikitext('Enemies') |
:wikitext('Enemies') |
||
:done() |
:done() |
||
:attr('style', 'vertical-align:top; width:15%; padding: 1em;') |
:attr('style', 'vertical-align:top; width:15%; padding: 0 1em;') |
||
:done() |
:done() |
||
:tag( 'td' ) |
:tag( 'td' ) |
||
:tag(' |
:tag('p') |
||
: |
:wikitext( args['enemies'] ) |
||
: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;') |