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 1: | Line 1: | ||
require('strict') |
|||
require('Module:Mw.html extension') |
require('Module:Mw.html extension') |
||
Line 6: | Line 5: | ||
function p.details(frame) |
function p.details(frame) |
||
local args = frame:getParent().args |
local args = frame:getParent().args |
||
local questJson = mw.text.jsonEncode({ |
|||
start_point = args.start_point, |
|||
required_for = args.required_for, |
|||
next_quest = args.next_quest, |
|||
⚫ | |||
items = args.items and '\n'..args.items, |
|||
recommended = args.recommended and '\n'..args.recommended, |
|||
enemies = args.enemies, |
|||
episode_nth = args.episode_nth or 9999 |
|||
}) |
|||
mw.smw.set({ |
mw.smw.set({ |
||
start_point = args.start_point, |
start_point = args.start_point, |
||
required_for = args.required_for, |
required_for = args.required_for, |
||
next_quest = args.next_quest, |
next_quest = args.next_quest, |
||
requirements = args.requirements, |
requirements = args.requirements and '\n'..args.requirements, |
||
items = args.items and '\n'..args.items, |
items = args.items and '\n'..args.items, |
||
recommended = args.recommended and '\n'..args.recommended, |
recommended = args.recommended and '\n'..args.recommended, |
||
enemies = args.enemies, |
enemies = args.enemies, |
||
override_seq = args.override_seq or 9999 |
|||
['Quest JSON'] = questJson |
|||
}) |
}) |
||
⚫ | |||
local table = mw.html.create('table') |
local table = mw.html.create('table') |
||
Line 97: | Line 86: | ||
['max-width'] = '85%', |
['max-width'] = '85%', |
||
['width'] = 'auto', |
['width'] = 'auto', |
||
['padding'] = ' |
['padding'] = '0.3em' |
||
['padding-right'] = '2em' |
|||
} |
} |
||
:tag('div') |
:tag('div') |
||
:addClass('lighttable checklist') |
:addClass('lighttable checklist') |
||
:newline() |
:newline() |
||
:wikitext( |
:wikitext(requirements) |
||
:newline() |
:newline() |
||
:done() |
:done() |
||
Line 124: | Line 112: | ||
['max-width'] = '85%', |
['max-width'] = '85%', |
||
['width'] = 'auto', |
['width'] = 'auto', |
||
['padding'] = ' |
['padding'] = '0.3em' |
||
['padding-right'] = '2em' |
|||
} |
} |
||
:tag('div') |
:tag('div') |
||
Line 152: | Line 139: | ||
['max-width'] = '85%', |
['max-width'] = '85%', |
||
['width'] = 'auto', |
['width'] = 'auto', |
||
['padding-left'] = '1em' |
['padding-left'] = '1em' |
||
['padding-right'] = '2em' |
|||
} |
} |
||
:tag('div') |
:tag('div') |