Module:ContractChainRewards/doc

From Dune: Awakening Community Wiki
Jump to navigation Jump to search

This is the documentation page for Module:ContractChainRewards

Module:ContractChainRewards

Renders the rewards of each Contract in a Contract Chain, for use by Template:QuestInfobox/ContractChain.

This module should not be invoked directly. To display Contract rewards on a Contract Chain page, use Template:QuestInfobox/ContractChain.

This module provides the following function(s):

  • main - looks up each listed Contract's rewards field via DPL3 and returns a linked, bolded Contract name followed by its rewards.

Usage

Render rewards for a chain

{{#invoke:ContractChainRewards|main|chain=Scrap Mettle|contracts=Copper Required~Wrecking Crew~Testing Limits}}

Include a cross-chain Contract

A name containing / is treated as a fully qualified title and is not prefixed with the chain.

{{#invoke:ContractChainRewards|main|chain=Scrap Mettle|contracts=Copper Required~Tradepost - The Anvil/Digging Deeper}}

Parameters

main

chain
string
The Contract Chain name. Prefixed to every Contract name that does not already contain a /.
contracts
string
One or more Contract names, separated by tildes ~. Empty items are skipped.
Returns an error message if not specified.

Notes

  • Each Contract is checked for existence before its rewards are queried. Missing Contracts render an error message in place of their rewards, so typos are visible on the page.
  • Rewards are pulled from each Contract's rewards field using DPL3, so the list is rendered exactly as written in the Contract's own infobox.
  • Each entry is rendered as a bolded link to the Contract, followed by its rewards on the next line. Entries are joined with
    .