Home
Random
Log in
Settings
About OtherX
Disclaimers
Search
Editing
Module:Sandbox
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local tb = require('Module:Trailblazer Region')._badge local p = {} function p.main(frame) local args = frame:getParent().args local orRegions = args['or'] or 'No' local regions = {'misthalin', 'karamja', 'asgarnia', 'desert', 'fremennik', 'kandarin', 'morytania', 'tirannwn', 'wilderness', 'kourend'} local ret = mw.html.create('tr') mw.log(args[1]) if args['incompletable'] == 'Yes' then ret:tag('th'):wikitext(args[1]):addClass('table-bg-red') else ret:tag('th'):wikitext(args[1]) end mw.log(tostring(ret)) local required = '' local auto = '' for _, region in ipairs(regions) do if args[region] ~= nil then if args[region] == 'Yes' then if #required ~= 0 then required = required .. '&' end required = required .. region elseif args[region] == 'auto' then auto = auto .. tb(region) else ret:tag('td'):wikitext(tb(region) .. ' ' .. args[region]) end end end if args['incompletable'] == 'Yes' then ret:tag('td'):addClass('table-bg-red') ret:tag('td'):addClass('table-bg-red') else ret:tag('td'):wikitext(auto) ret:tag('td'):wikitext(tb(required)) end if args['playable'] == 'Yes' then if args['incompletable'] == 'Yes' then ret:tag('td'):wikitext(string.format('[[File:Yes check.svg|20px|link=|alt=Quest may be played without autocompletion]] Partially playable')):addClass('table-bg-red') else ret:tag('td'):wikitext(string.format('[[File:Yes check.svg|20px|link=|alt=Quest may be played without autocompletion]] Fully playable')) end elseif args['playable'] == 'No' then if args['incompletable'] == 'Yes' then ret:tag('td'):wikitext(string.format('[[File:X mark.svg|20px|link=|alt=Quest may not be played through]] Not completeable')):addClass('table-bg-red') else ret:tag('td'):wikitext(string.format('[[File:X mark.svg|20px|link=|alt=Quest may not be played through]] Autocomplete only')) end else if args['incompletable'] == 'Yes' then ret:tag('td'):wikitext(''):addClass('table-bg-red') else ret:tag('td'):wikitext('') end end if args['incompletable'] == 'Yes' then ret:tag('td'):wikitext(args['notes'] or ''):addClass('table-bg-red') else ret:tag('td'):wikitext(args['notes'] or '') end return tostring(ret) end return p
Summary:
Please note that all contributions to OtherX may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
OtherX:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Documentation
(
edit
)
Template:USERNAME
(
edit
)
Module:Array
(
edit
)
Module:DPLlua
(
edit
)
Module:DependencyList
(
edit
)
Module:Documentation
(
edit
)
Module:Paramtest
(
edit
)
Module:Sandbox
(
edit
)
Module:Sandbox/doc
(
edit
)
Module:Tooltip
(
edit
)
Module:Yesno
(
edit
)