Module:Sandbox/Skkias/TestDictionary
Jump to navigation
Jump to search
You might want to create a documentation page for this module.
Editors can experiment in this module's sandbox and testcases pages.
Please add categories to the /doc subpage. Subpages of this module.
Editors can experiment in this module's sandbox and testcases pages.
Please add categories to the /doc subpage. Subpages of this module.
local p = {}
-- Sample data for testing
local dictionary = {
["Town"] = {
["Clearfell Encampment"] = "A large coastal city and key location in the story.",
},
["Mechanic"] = {
["Attack"] = "This is the ability that is attached to your weapon. Skills and modifiers are calculated separately from this.",
},
}
function p.getEntry(frame)
local term = frame.args.term or "Unknown"
local category = frame.args.category or "Town"
if dictionary[category] and dictionary[category][term] then
return dictionary[category][term]
else
return "Entry not found."
end
end
return p