Difference between revisions of "Module:Collection"
From Nookipedia, the Animal Crossing wiki
PanchamBro (talk | contribs) m |
PanchamBro (talk | contribs) (adding more collections to sort) |
||
Line 30: | Line 30: | ||
["Jingle Series"] = {"Festive Series"}, | ["Jingle Series"] = {"Festive Series"}, | ||
["Mushroom Series"] = {"Mush Series"}, | ["Mushroom Series"] = {"Mush Series"}, | ||
− | ["Minimalist Series"] = {"Simple Series"} | + | ["Minimalist Series"] = {"Simple Series"}, |
+ | ["Teddy Bear Set"] = {"Bear Set"}, | ||
+ | ["Cafe Set"] = {"Café Set"}, | ||
+ | ["Hospital Set"] = {"Dr.'s Office Set"}, | ||
+ | ["Froggy Set"] = {"Frog Set"}, | ||
+ | ["Writing Set"] = {"Study Set"}, | ||
+ | ["Homework Set"] = {"Study Set"}, | ||
+ | ["Classroom Set"] = {"School Set"}, | ||
+ | ["Japanese Set"] = {"Zen Set"}, | ||
+ | ["Backyard Set"] = {"Zen Garden Set"}, | ||
+ | ["Public Bath Theme"] = {"Spa Theme"}, | ||
+ | |||
} | } | ||
local print = '' | local print = '' |
Revision as of 13:49, September 12, 2022
Documentation for this module may be created at Module:Collection/doc
local p = {}
local function getArgs(frame)
local args = {}
for key, value in pairs(frame:getParent().args) do
args[key] = value
end
for key, value in pairs(frame.args) do
args[key] = value
end
return args
end
function p.main(frame)
local args = getArgs(frame)
local collection = args[1] or args.collection or ''
return p.collectionFurniture(collection)
end
function p.collectionFurniture(collection)
local function isEmpty(s)
return s == nil or s == ''
end
local function tableEmpty(s)
return next(s) == nil
end
local data = {
["Asian Series"] = {"Exotic Series"},
["Pavé Series"] = {"Festivale Series"},
["Jingle Series"] = {"Festive Series"},
["Mushroom Series"] = {"Mush Series"},
["Minimalist Series"] = {"Simple Series"},
["Teddy Bear Set"] = {"Bear Set"},
["Cafe Set"] = {"Café Set"},
["Hospital Set"] = {"Dr.'s Office Set"},
["Froggy Set"] = {"Frog Set"},
["Writing Set"] = {"Study Set"},
["Homework Set"] = {"Study Set"},
["Classroom Set"] = {"School Set"},
["Japanese Set"] = {"Zen Set"},
["Backyard Set"] = {"Zen Garden Set"},
["Public Bath Theme"] = {"Spa Theme"},
}
local print = ''
if not isEmpty(collection) then
if not isEmpty(data[collection]) and not isEmpty(data[collection][1]) then
print = print .. data[collection][1]
else
print = print .. collection
end
end
return print
end
return p