Module:Utils

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" }, }

local p = {}

-- generate quest page function p.quest_page(frame) -- get current page name local page_name = mw.title.getCurrentTitle.subpageText -- get current page name without any disambiguation suffix local page_basename = mw.ustring.gsub(page_name, '%s%(.*', '')

-- get params local quest_type = frame.args['type'] local quest_image = frame.args['image'] local quest_giver = frame.args['quest_giver'] -- get derived params local quest_type_name = quest_types[quest_type]['title'] local quest_type_pagename = quest_types[quest_type]['pagename']

-- config local do_preamble = true; local do_lead = true;

-- init local result = '';

-- preamble if do_preamble then result = result .. ''   	result = result .. ''   end

-- build infobox result = result .. ' '   result = result .. ' ' .. page_basename .. ' '    result = result .. ' ' .. quest_image .. ' '    result = result .. ' Description ' result = result .. ' '   result = result .. ' '   result = result .. ' '   result = result .. ' '

-- lead if do_lead then result = result .. "'''" .. page_basename .. "' is a ' .. quest_type_name .. " in Cyberpunk 2077''. " end -- done return frame:preprocess(result) end

return p