Module:QuestDetails: Difference between revisions

Set smw requirements to "None" if no requirements are given (rather than not setting it)
m (Simplify / cleanup (This code should have the exact same effect))
(Set smw requirements to "None" if no requirements are given (rather than not setting it))
Line 1:
require('strict')
require('Module:Mw.html extension')
 
Line 5 ⟶ 6:
function p.details(frame)
local args = frame:getParent().args
local requirements = (args.requirements and '\n'..args.requirements) or 'None'
 
mw.smw.set({
Line 10 ⟶ 13:
required_for = args.required_for,
next_quest = args.next_quest,
requirements = args.requirements and '\n'..args.requirements,
items = args.items and '\n'..args.items,
recommended = args.recommended and '\n'..args.recommended,
Line 16 ⟶ 19:
override_seq = args.override_seq or 9999
})
 
local requirements = args.requirements or 'None'
 
local table = mw.html.create('table')
Line 90 ⟶ 91:
:tag('div')
:addClass('lighttable checklist')
:newline()
:wikitext(requirements)
:newline()
:done()
:done()
661

edits