Module:DungeonBox

From Limbus Company Wiki
Jump to navigation Jump to search

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

local p = {}

function p.NodeID(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 nodeData = mw.loadData ('Module:DungeonBox/data')
  
  -- Get the table corresponding to the provided name
  local nodeName = nodeData[id]

  -- Check if the key exists in the selected table
  if nodeName[key] then
    return nodeName[key]
  else
    return nil
  end
end

return p