<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mbwiki.stairwaygames.work/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AConfig</id>
	<title>Module:Config - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mbwiki.stairwaygames.work/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AConfig"/>
	<link rel="alternate" type="text/html" href="https://mbwiki.stairwaygames.work/w/index.php?title=Module:Config&amp;action=history"/>
	<updated>2026-04-09T04:21:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://mbwiki.stairwaygames.work/w/index.php?title=Module:Config&amp;diff=9933&amp;oldid=prev</id>
		<title>Salty Nori: remove dev wiki</title>
		<link rel="alternate" type="text/html" href="https://mbwiki.stairwaygames.work/w/index.php?title=Module:Config&amp;diff=9933&amp;oldid=prev"/>
		<updated>2023-12-17T15:36:52Z</updated>

		<summary type="html">&lt;p&gt;remove dev wiki&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:36, 17 December 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l19&quot;&gt;Line 19:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 19:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local tableTools = require(&amp;#039;Module:TableTools&amp;#039;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local tableTools = require(&amp;#039;Module:TableTools&amp;#039;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-- Module constants&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;local DEV_WIKI = &#039;https://dev.fandom.com&#039;;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local p = {};&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;local p = {};&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l116&quot;&gt;Line 116:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 113:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	source = string.gsub(source, &amp;#039;^.&amp;#039;, mw.ustring.upper);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	source = string.gsub(source, &amp;#039;^.&amp;#039;, mw.ustring.upper);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local hasNS = mw.ustring.find(source, &amp;#039;:&amp;#039;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	local hasNS = mw.ustring.find(source, &amp;#039;:&amp;#039;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	&lt;/del&gt;if (not hasNS) then&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    &lt;/ins&gt;if (not hasNS) then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		&lt;/del&gt;source = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;source .. &lt;/del&gt;&amp;#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/config&amp;#039;;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;        &lt;/ins&gt;source = &amp;#039;Module:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#039; &lt;/ins&gt;.. source .. &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#039;&lt;/ins&gt;/config&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		if (mw.site.server ~= DEV_WIKI) then&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;    &lt;/ins&gt;end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;			-- If this is dev.fandom.com, then `&amp;quot;&lt;/del&gt;Module:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;quot; &lt;/del&gt;.. source .. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;quot;&lt;/del&gt;/config&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;quot;`&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;			-- and `&amp;quot;Dev:&amp;quot; .. source .. &amp;quot;/config&amp;quot;` point to the same configuration page&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;			local exists, localData = pcall(mw.loadData, &lt;/del&gt;&amp;#039;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Module:&amp;#039; .. source);&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;			if (exists and type(localData) == &amp;#039;table&amp;#039;) then&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;				cfg._data[#cfg._data + 1] = localData;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;			end&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		end&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;		source = &amp;#039;Dev:&amp;#039; .. source&lt;/del&gt;;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;	&lt;/del&gt;end&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	cfg._data[#cfg._data + 1] = mw.loadData(source);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	cfg._data[#cfg._data + 1] = mw.loadData(source);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Salty Nori</name></author>
	</entry>
	<entry>
		<id>https://mbwiki.stairwaygames.work/w/index.php?title=Module:Config&amp;diff=9920&amp;oldid=prev</id>
		<title>Salty Nori: Created page with &quot;-- &lt;pre&gt; -------------------------------------------------------------------------------- -- Copied from Genshin Impact Wiki. -- Allows wikis to locally override `/config` subpages of modules. -- -- @script config -- @alias p -- @release experimental -- @require Module:No globals -- @require Module:TableTools -- @author User:ExE Boss -- @see Module:I18n - Inspired the way in which the @{Config} class works. ------------------------------------------------...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mbwiki.stairwaygames.work/w/index.php?title=Module:Config&amp;diff=9920&amp;oldid=prev"/>
		<updated>2023-12-17T13:00:07Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- &amp;lt;pre&amp;gt; -------------------------------------------------------------------------------- -- Copied from Genshin Impact Wiki. -- Allows wikis to locally override `/config` subpages of modules. -- -- @script config -- @alias p -- @release experimental -- @require &lt;a href=&quot;/w/index.php?title=Module:No_globals&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Module:No globals (page does not exist)&quot;&gt;Module:No globals&lt;/a&gt; -- @require &lt;a href=&quot;/wiki/Module:TableTools&quot; title=&quot;Module:TableTools&quot;&gt;Module:TableTools&lt;/a&gt; -- @author &lt;a href=&quot;/w/index.php?title=User:ExE_Boss&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:ExE Boss (page does not exist)&quot;&gt;User:ExE Boss&lt;/a&gt; -- @see &lt;a href=&quot;/wiki/Module:I18n&quot; title=&quot;Module:I18n&quot;&gt;Module:I18n&lt;/a&gt; - Inspired the way in which the @{Config} class works. ------------------------------------------------...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- &amp;lt;pre&amp;gt;&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Copied from Genshin Impact Wiki.&lt;br /&gt;
-- Allows wikis to locally override `/config` subpages of modules.&lt;br /&gt;
--&lt;br /&gt;
-- @script config&lt;br /&gt;
-- @alias p&lt;br /&gt;
-- @release experimental&lt;br /&gt;
-- @require [[Module:No globals]]&lt;br /&gt;
-- @require [[Module:TableTools]]&lt;br /&gt;
-- @author [[User:ExE Boss]]&lt;br /&gt;
-- @see [[Module:I18n]] - Inspired the way in which the @{Config} class works.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local libraryUtil = require(&amp;#039;libraryUtil&amp;#039;);&lt;br /&gt;
local checkType = libraryUtil.checkType;&lt;br /&gt;
local checkTypeMulti = libraryUtil.checkTypeMulti;&lt;br /&gt;
local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg;&lt;br /&gt;
&lt;br /&gt;
local tableTools = require(&amp;#039;Module:TableTools&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
-- Module constants&lt;br /&gt;
local DEV_WIKI = &amp;#039;https://dev.fandom.com&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
local p = {};&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- @function p._substArgsInMsg&lt;br /&gt;
-- @param {string} msg&lt;br /&gt;
-- @param {table} args&lt;br /&gt;
--]]&lt;br /&gt;
local function substArgsInMsg(msg, args)&lt;br /&gt;
	checkType(&amp;#039;substArgsInMsg&amp;#039;, 1, msg, &amp;#039;string&amp;#039;);&lt;br /&gt;
	checkType(&amp;#039;substArgsInMsg&amp;#039;, 2, args, &amp;#039;table&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
	for i, value in tableTools.sparseIpairs(args) do&lt;br /&gt;
		msg = string.gsub(msg, &amp;#039;%$&amp;#039; .. tostring(i), tostring(value));&lt;br /&gt;
	end&lt;br /&gt;
	return msg;&lt;br /&gt;
end&lt;br /&gt;
p._substArgsInMsg = substArgsInMsg;&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- Configuration datastore class&lt;br /&gt;
-- @type Config&lt;br /&gt;
--]]&lt;br /&gt;
local Config = {};&lt;br /&gt;
Config.__index = Config;&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- Datastore option getter.&lt;br /&gt;
--&lt;br /&gt;
-- This method returns values from the datastore corresponding to a `key`.&lt;br /&gt;
--&lt;br /&gt;
-- If the value is a string, then these values may have `$n` parameters, which&lt;br /&gt;
-- can be replaced by optional argument strings supplied by the `getValue` call.&lt;br /&gt;
--&lt;br /&gt;
-- @function Config:getValue&lt;br /&gt;
-- @param {string|table} option Config query or string key to return from the datastore.&lt;br /&gt;
-- @param {string} option.key String key to return from the datastore.&lt;br /&gt;
-- @param[opt] {table} option.args Arguments to substitute into the value (`$n`).&lt;br /&gt;
-- @param[opt] {string} ... Arguments to substitute into the value (`$n`).&lt;br /&gt;
-- @return {nil|boolean|string|number|table}&lt;br /&gt;
--]]&lt;br /&gt;
function Config:getValue(option, ...)&lt;br /&gt;
	checkTypeMulti(&amp;#039;Config:getValue&amp;#039;, 1, option, { &amp;#039;table&amp;#039;, &amp;#039;string&amp;#039; });&lt;br /&gt;
&lt;br /&gt;
	local key;&lt;br /&gt;
	local args;&lt;br /&gt;
&lt;br /&gt;
	if (type(option) == &amp;#039;table&amp;#039;) then&lt;br /&gt;
		key = option.key;&lt;br /&gt;
		checkTypeForNamedArg(&amp;#039;Config:getValue&amp;#039;, &amp;#039;key&amp;#039;, key, &amp;#039;string&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
		args = option.args;&lt;br /&gt;
		checkTypeForNamedArg(&amp;#039;Config:getValue&amp;#039;, &amp;#039;args&amp;#039;, args, &amp;#039;table&amp;#039;, true);&lt;br /&gt;
	else -- type(option) == &amp;#039;string&amp;#039;&lt;br /&gt;
		key = option;&lt;br /&gt;
		args = select(&amp;#039;#&amp;#039;, ...) &amp;gt; 0 and { ... } or nil;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- value fetching&lt;br /&gt;
	local value;&lt;br /&gt;
	for _, data in ipairs(self._data) do&lt;br /&gt;
		value = data[key];&lt;br /&gt;
		if (value ~= nil) then&lt;br /&gt;
			break;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if (type(value) == &amp;#039;string&amp;#039; and args) then&lt;br /&gt;
		value = substArgsInMsg(value, args);&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return value;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- Loads the configuration from the global `&amp;quot;Dev:&amp;quot; .. source .. &amp;quot;/config&amp;quot;` configuration page&lt;br /&gt;
-- with overrides from the local `&amp;quot;Module:&amp;quot; .. source .. &amp;quot;/config&amp;quot;` configuration page.&lt;br /&gt;
--&lt;br /&gt;
-- @function p.loadConfig&lt;br /&gt;
-- @param {string} source&lt;br /&gt;
-- @return {Config}&lt;br /&gt;
--]]&lt;br /&gt;
function p.loadConfig(source)&lt;br /&gt;
	if (source == &amp;#039;&amp;#039;) then&lt;br /&gt;
		source = nil&lt;br /&gt;
	end&lt;br /&gt;
	checkType(&amp;#039;loadConfig&amp;#039;, 1, source, &amp;#039;string&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
	local cfg = {};&lt;br /&gt;
	cfg._data = {};&lt;br /&gt;
	setmetatable(cfg, Config);&lt;br /&gt;
	&lt;br /&gt;
	source = string.gsub(source, &amp;#039;^.&amp;#039;, mw.ustring.upper);&lt;br /&gt;
	local hasNS = mw.ustring.find(source, &amp;#039;:&amp;#039;);&lt;br /&gt;
	if (not hasNS) then&lt;br /&gt;
		source = source .. &amp;#039;/config&amp;#039;;&lt;br /&gt;
		if (mw.site.server ~= DEV_WIKI) then&lt;br /&gt;
			-- If this is dev.fandom.com, then `&amp;quot;Module:&amp;quot; .. source .. &amp;quot;/config&amp;quot;`&lt;br /&gt;
			-- and `&amp;quot;Dev:&amp;quot; .. source .. &amp;quot;/config&amp;quot;` point to the same configuration page&lt;br /&gt;
			local exists, localData = pcall(mw.loadData, &amp;#039;Module:&amp;#039; .. source);&lt;br /&gt;
			if (exists and type(localData) == &amp;#039;table&amp;#039;) then&lt;br /&gt;
				cfg._data[#cfg._data + 1] = localData;&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		source = &amp;#039;Dev:&amp;#039; .. source;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	cfg._data[#cfg._data + 1] = mw.loadData(source);&lt;br /&gt;
	return cfg;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
-- Exports classes for testing&lt;br /&gt;
--&lt;br /&gt;
-- @function p._exportClasses&lt;br /&gt;
-- @private&lt;br /&gt;
-- @return {table}&lt;br /&gt;
--]]&lt;br /&gt;
function p._exportClasses()&lt;br /&gt;
	return {&lt;br /&gt;
		Config = Config,&lt;br /&gt;
	};&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p;&lt;br /&gt;
-- &amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Salty Nori</name></author>
	</entry>
</feed>