![]() |
VOOZH | about |
This module implements {{DungeonsDLC}}. Data stored in Module:DungeonsDLC/data.
localp={} locali18n={ title="This page describes content that is a part of the [[MCD:$1|$2]] DLC.", titleUpcoming="This page describes content that is a part of an upcoming DLC.", titleSection="This section describes content that is a part of the [[MCD:$1|$2]] DLC.", titleUpcomingSection="This section describes content that is a part of an upcoming DLC.", message="This feature may be added to the game in the future.", category="[[Category:$1 content]]", categoryFuture="[[Category:Minecraft Dungeons future content]]", } functionp.base(f) localargs=f iff==mw.getCurrentFrame()then args=require('Module:ProcessArgs').merge(true) else f=mw.getCurrentFrame() end localdataPage=mw.loadData('Module:DungeonsDLC/data') localdata=dataPage[args[1]]or{} localtitle ifnotargs.sectionthen ifargs[1]then title=i18n.title:gsub('%$1',args[1]):gsub('%$2',data.nameorargs[1]) else title=i18n.titleUpcoming end else ifargs[1]then title=i18n.titleSection:gsub('%$1',args[1]):gsub('%$2',data.nameorargs[1]) else title=i18n.titleUpcomingSection end end localtext ifdata.released==truethen text=args.messageor'' else text=args.messageori18n.message end localcat ifnotargs.nocatthen ifargs[1]then ifdata.released==truethen cat=i18n.category:gsub('%$1',args[1]or'') else cat=i18n.category:gsub('%$1',args[1]or'')..i18n.categoryFuture end else cat=i18n.categoryFuture end end localmsgbox=f:expandTemplate{title='Message box',args={ title=title, text=text, image=data.imageor"Mystery Armor (MCD).png", type="edition", mini=args.sectionor'' }} returnmsgbox,cator'' end functionp.doc(f) localdataPage=mw.loadData('Module:DungeonsDLC/data') localvalid_args={} fordlc_name,valinpairs(dataPage)do table.insert(valid_args,dlc_name) end localrows={} fori,valinpairs(valid_args)do table.insert(rows,f:preprocess('<tr><td>{{t|DungeonsDLC|'..valid_args[i]..'}}</td><td>{{DungeonsDLC|'..valid_args[i]..'|nocat=1}}</td></tr>')) end returntable.concat(rows) end returnp