Difference between revisions of "Module:Collection"
From Nookipedia, the Animal Crossing wiki
PanchamBro (talk | contribs) m |
PanchamBro (talk | contribs) m |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
− | + | local getArgs = require('Module:Arguments').getArgs | |
− | local | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
function p.main(frame) | function p.main(frame) | ||
Line 30: | Line 20: | ||
["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"}, | ||
+ | ["Black Chess Set"] = {"Chess Set"}, | ||
+ | ["White Chess Set"] = {"Chess Set"}, | ||
+ | ["Daruma Set"] = {"Dharma Set"}, | ||
+ | ["Hospital Set"] = {"Dr.'s Office Set"}, | ||
+ | ["Yellow Flower Set"] = {"Flower Set"}, | ||
+ | ["White Flower Set"] = {"Flower Set"}, | ||
+ | ["Red Flower Set"] = {"Flower Set"}, | ||
+ | ["Iris Set"] = {"Flower Set"}, | ||
+ | ["Daffodil Set"] = {"Flower Set"}, | ||
+ | ["Tulip Set"] = {"Flower Set"}, | ||
+ | ["Froggy Set"] = {"Frog Set"}, | ||
+ | ["Welcome Kitty Set"] = {"Lucky Cat Set"}, | ||
+ | ["Strings Set"] = {"String Section Set"}, | ||
+ | ["Writing Set"] = {"Study Set"}, | ||
+ | ["Homework Set"] = {"Study Set"}, | ||
+ | ["Classroom Set"] = {"School Set"}, | ||
+ | ["Japanese Set"] = {"Zen Set"}, | ||
+ | ["Backyard Set"] = {"Zen Garden Set"}, | ||
+ | ["Publicbath Theme"] = {"Spa Theme"}, | ||
+ | ["Pirate Theme"] = {"Pirate Ship Theme"}, | ||
} | } | ||
local print = '' | local print = '' | ||
if not isEmpty(collection) then | if not isEmpty(collection) then | ||
− | if not | + | if not isEmpty(data[collection]) and not isEmpty(data[collection][1]) then |
print = print .. data[collection][1] | print = print .. data[collection][1] | ||
else | else |
Latest revision as of 18:22, January 5, 2023
Documentation for this module may be created at Module:Collection/doc
local p = {}
local getArgs = require('Module:Arguments').getArgs
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"},
["Black Chess Set"] = {"Chess Set"},
["White Chess Set"] = {"Chess Set"},
["Daruma Set"] = {"Dharma Set"},
["Hospital Set"] = {"Dr.'s Office Set"},
["Yellow Flower Set"] = {"Flower Set"},
["White Flower Set"] = {"Flower Set"},
["Red Flower Set"] = {"Flower Set"},
["Iris Set"] = {"Flower Set"},
["Daffodil Set"] = {"Flower Set"},
["Tulip Set"] = {"Flower Set"},
["Froggy Set"] = {"Frog Set"},
["Welcome Kitty Set"] = {"Lucky Cat Set"},
["Strings Set"] = {"String Section Set"},
["Writing Set"] = {"Study Set"},
["Homework Set"] = {"Study Set"},
["Classroom Set"] = {"School Set"},
["Japanese Set"] = {"Zen Set"},
["Backyard Set"] = {"Zen Garden Set"},
["Publicbath Theme"] = {"Spa Theme"},
["Pirate Theme"] = {"Pirate Ship 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