ARK Survival Evolved Wiki

วิกินี้ไม่ใช่วิกิทางการอีกต่อไป
ประกาศเมื่อ 22 เมษายน 2022 ตามเวลาประเทศไทย

READ MORE

ARK Survival Evolved Wiki
Register
Advertisement

เอกสารการใช้งานสำหรับมอดูลนี้อาจสร้างขึ้นที่ มอดูล:DLCLink/doc

-- checks if the name contains a DLC-suffix and changes it to the according DLC-icon. then returns a link to name.

local p = {}
function p.link(name, noDlcIcon)
  -- look up DLC icon info for the name with DissectDlcItemName
  local tryMatch = require('Module:DissectDlcItemName').tryMatch
  local info = tryMatch(name)
  if info then
  	return '[['..name..'|'..info.displayName..']]'.. ((not noDlcIcon) and ' [[File:'..info.dlcIcon..'|16px|link='..info.dlcArticle..'|alt=('..info.dlcArticle..')]]' or '')
  end

  -- if no dlc was found, use generic approach
  local title = mw.title.new(name)
  if title == nil then
    return 'page not found: ' .. name
  end
  local link = (#title.nsText > 0) and (title.fullText .. '|' .. title.text) or title.text
  return '[['..link..']]'
end
return p
Advertisement