Module:Game shortened/doc

From Inkipedia, the Splatoon wiki
Revision as of 17:13, 27 September 2024 by Nukleopatra (talk | contribs) (Text replacement - "GameFromAbbreviation" to "Game from abbreviation")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the documentation page for Module:Game shortened

Helper template that transforms the game argument into the shortened S form. For template chaining and code reduction. Will also help us when new game/expansions/formats are created.

If the game is not matched, the default argument is used instead if specified, otherwise "S".

Usage

game Named or first positional, optional The game that the cost belongs to. The following values are handled:
  • Octo Expansion -> OE
  • Side Order -> SO
  • Salmon Run -> SR
  • Splatoon -> S
  • Splatoon 1 -> S
  • Splatoon 2 -> S2
  • Splatoon 3 -> S3
  • OE -> OE
  • SO -> SO
  • SR -> SR
  • S -> S
  • S2 -> S2
  • S3 -> S3

If game is not specified, the default argument will be used instead.

default Named or second positional, optional If the game argument was not matched, uses this instead.
  • Defaults to "S".
Typical usage

{{Game shortened|<game>|<default>}}

{{Game shortened|Octo Expansion}} -> OE

Chained in another template that has the game parameter

{{Game shortened|{{{game|}}}}} -> S

Using the default parameter

{{Game shortened|Splatoon 3|S}} -> S3

{{Game shortened|game=Splatoon 2|default=Splatoon}} -> S2

In files

[[File:{{Game shortened|Splatoon 3}}_Icon_Big_Run.svg|link=Big Run|30px]] ->

[[File:{{Game shortened|game=Splatoon 2|default=Splatoon 3}}_Splatfest_Logo.svg|link=Splatfest|30px]] ->

See Also