Module:StatusEffect

From Limbus Company Wiki
Jump to navigation Jump to search

Documentation for this module may be created at Module:StatusEffect/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 statusData = mw.loadData ('Module:StatusEffect/data')
  
  -- Get the table corresponding to the provided name
  local statusName = statusData[name]
  
  -- Check if the key exists in the selected table
  if statusName[key] then
  	return statusName[key]
  elseif statusName[key] == tname then
  	return tname
  else
  	return "TBD"
  end
end

return p