Module:Utils

-- Config local quest_types = {	main = { title = "Main Job", pagename = "Cyberpunk 2077 Main Jobs" }, side = { title = "Side Job", pagename = "Cyberpunk 2077 Side Jobs" }, gig = { title = "Gig", pagename = "Cyberpunk 2077 Gigs" }, nsh = { title = "NCPD Scanner Hustle", pagename = "Cyberpunk 2077 NCPD Scanner Hustles" }, }

-- Code starts here local p = {}

-- return current page basename function p.current_page_basename(frame)

-- get current subpage name local page_name = mw.title.getCurrentTitle.subpageText -- strip any disambiguation suffix local page_basename = mw.ustring.gsub(page_name, '%s%(.*', '')

-- done return page_basename

end

-- return canonical text for quest type function p.quest_type(frame) local quest_type = frame.args[1] -- get derived params local quest_type_name = quest_types[quest_type]['title'] local quest_type_pagename = quest_types[quest_type]['pagename']

local result =  .. quest_type_name ..  return frame:preprocess(result) end

return p