Module:ENPanic

From Limbus Company Wiki
Jump to navigation Jump to search

Documentation for this module may be created at Module:ENPanic/doc

local p = {}

function p.getData(frame)
  -- Get the table name and key from the template call
  local name = frame.args[1]
  local key = frame.args[2]
  
  -- Define a list of tables
  local panicData = mw.loadData ('Module:ENPanic/data')
  
  -- Get the table corresponding to the provided name
  local panicName = panicData[name]
  
  -- Check if the key exists in the selected table
  if panicName[key] then
  	return panicName[key]
  elseif panicName[key] == tname then
  	return tname
  else
  	return "TBD"
  end
end

return p