Template:Source code ref

From Terraria Wiki
Jump to: navigation, search
This template is i18n-ready, which means it is easy to localize for different languages. Please see i18n & l10n for Templates to learn more.
See Template:Source code ref/l10n for the localization of this template.
Template-info.svg Documentation The documentation below is transcluded from Template:Source code ref/doc. (edit | history)

This template can be used to mark information as being taken from Terraria's source code. It prints a short, modifiable text wrapped in a <ref> tag.

Usage

{{source code ref | v = <current version> | <further comments> | noref = y/yes | name = <custom <ref> name> }}

v

Set it to the current version of Terraria. This helps identifying potentially outdated information in future updates.

First unnamed parameter

Can be used to add further comments, like method names or other specifications.

noref

Set to y/yes to suppress the <ref> tag.

name

Can be used to specify a custom name for the <ref>, so that a <ref> can be reused several times (via <ref name="<name>" />). Only has an effect if noref is not set.

Notes

Examples

Code Result
{{source code ref|v=1.3.5.3|noref=y}} Information taken from the Desktop version Desktop 1.3.5.3 source code. There may be inaccuracies, as the current Desktop version Desktop version is 1.4.2.3.
{{source code ref|v=1.3.0.1|noref=y}} Information taken from the Desktop version Desktop 1.3.0.1 source code. There may be inaccuracies, as the current Desktop version Desktop version is 1.4.2.3.
{{source code ref|v=1.3.5.3|function {{code|Foo()}} in {{code|Bar.cs}}|noref=y}} Information taken from the Desktop version Desktop 1.3.5.3 source code, function Foo() in Bar.cs There may be inaccuracies, as the current Desktop version Desktop version is 1.4.2.3.
The thing takes three seconds to be done in normal mode and six seconds in Expert mode.{{source code ref|v=1.3.0.1|function {{code|Foo()}} in {{code|Bar.cs}}}} The thing takes three seconds to be done in normal mode and six seconds in Expert mode.[1]

References

  1. Information taken from the Desktop version Desktop 1.3.0.1 source code, function Foo() in Bar.cs There may be inaccuracies, as the current Desktop version Desktop version is 1.4.2.3.