m (Oops) |
(Error handler) |
||
Line 15: | Line 15: | ||
Staff = 'Rod' |
Staff = 'Rod' |
||
} |
} |
||
⚫ | |||
⚫ | |||
+ | |||
⚫ | |||
+ | if (selected == nil) then |
||
+ | return "Invalid" |
||
⚫ | |||
+ | |||
+ | return selected |
||
end |
end |
||
Revision as of 11:29, 4 July 2019
Documentation for this module may be created at Module:Fodders/doc
-- Used in https://kamihime-project.fandom.com/wiki/Template:Advent_Infobox
local p = {}
function p.main(frame)
local type = frame.args['type']
local names = {
Bow = 'Ballista',
Gun = 'Burst',
Sword = 'Claymore',
Axe = 'Halberd',
Hammer = 'Hammer',
Lance = 'Lance',
Orb = 'Arcane',
Staff = 'Rod'
}
local selected = names[type]
if (selected == nil) then
return "Invalid"
end
return selected
end
return p