Module:EnBox
Jump to navigation
Jump to search
Documentation for this module may be created at Module:EnBox/doc
local p = {}
function p.EnID(frame)
-- Get the table name and key from the template call
local id = frame.args[1]
local key = frame.args[2]
-- Define a list of tables
local enemyData = mw.loadData ('Module:EnBox/data')
-- Get the table corresponding to the provided name
local enemyName = enemyData[id]
-- Check if the key exists in the selected table
if enemyName[key] then
return enemyName[key]
else
return nil
end
end
return p