7,878
edits
No edit summary Tag: Reverted |
No edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
modLink = '$1:$2', | modLink = '$1:$2', | ||
moduleAliases = [[Module:Inventory slot/Aliases]], | moduleAliases = [[Module:Inventory slot/Aliases]], | ||
moduleParallelAliases = [[Module:ParallelAliases]], | |||
moduleRandom = [[Module:Random]], | moduleRandom = [[Module:Random]], | ||
-- List of special prefixes which should be handled by | -- List of special prefixes which should be handled by | ||
Line 26: | Line 27: | ||
local random = require( i18n.moduleRandom ).random | local random = require( i18n.moduleRandom ).random | ||
local aliases = mw.loadData( i18n.moduleAliases ) | local aliases = mw.loadData( i18n.moduleAliases ) | ||
local parallelAliases = mw.loadData( i18n.moduleParallelAliases ) | |||
local pageName = mw.title.getCurrentTitle().text | local pageName = mw.title.getCurrentTitle().text | ||
--[[Splits a given text into fragments separated by semicolons that are not | --[[Splits a given text into fragments separated by semicolons that are not | ||
Line 105: | Line 105: | ||
local title = frame.title or mw.text.trim( args.title or '' ) | local title = frame.title or mw.text.trim( args.title or '' ) | ||
-- local mod = frame.mod | -- local mod = frame.mod | ||
mod = frame.mod -- <----- THIS IS CHANGED | local mod = frame.mod -- <----- THIS IS CHANGED | ||
local name = frame.name or '' | local name = frame.name or '' | ||
local num = frame.num | local num = frame.num | ||
Line 149: | Line 149: | ||
end | end | ||
else | else | ||
link = | link = name:gsub( '^' .. i18n.prefixes.damaged .. ' ', '' ) .. ' (Vanilla)' | ||
for _, suffix in pairs( i18n.suffixes ) do | for _, suffix in pairs( i18n.suffixes ) do | ||
link = link:gsub( ' ' .. suffix .. '$', '' ) | link = link:gsub( ' ' .. suffix .. '$', '' ) | ||
Line 339: | Line 339: | ||
-- end | -- end | ||
if frame.mod then -- <--- THIS IS CHANGED | if frame.mod then -- <--- THIS IS CHANGED | ||
if mod | if frame.mod == 'parallel' then | ||
modData.aliases = parallelAliases | |||
else | |||
id = frame.mod .. ':' .. id | id = frame.mod .. ':' .. id | ||
end | end |