Template:Code Reference: Difference between revisions
Jump to navigation
Jump to search
m (revert) |
(add documentation) |
||
Line 1: | Line 1: | ||
<includeonly>{{#if:{{{class|}}}| | <noinclude>This template is used for cohesive citation of the game's C# classes. It's called like so: | ||
<pre><nowiki>{{Part Reference | |||
| namespace = Fake.Namespace | |||
| class = FakeClass | |||
| method = FakeMethod | |||
}}</nowiki></pre> | |||
All parameters except <code>class</code> can usefully be omitted: | |||
* If <code>class</code> is missing, the page will be tagged with [[:Category:Pages with part reference errors]]. | |||
* If <code>namespace</code> is missing, it defaults to <code>XRL.World.Parts</code>. | |||
* If <code>method</code> is missing, the descriptive text related to it is omitted. | |||
The above example results in the following citation:{{Part Reference | |||
| namespace = Fake.Namespace | |||
| class = FakeClass | |||
| method = FakeMethod | |||
}}</noinclude><includeonly>{{#if:{{{class|}}}|{{#tag:ref|<code>{{{namespace|XRL.World.Parts}}}.{{{class}}}{{#if:{{{method|}}}|, method {{{method}}}}}</code>}}|[[Category:Pages with part reference errors]]}}</includeonly> |
Revision as of 06:27, 1 August 2020
This template is used for cohesive citation of the game's C# classes. It's called like so:
{{Part Reference | namespace = Fake.Namespace | class = FakeClass | method = FakeMethod }}
All parameters except class
can usefully be omitted:
- If
class
is missing, the page will be tagged with Category:Pages with part reference errors. - If
namespace
is missing, it defaults toXRL.World.Parts
. - If
method
is missing, the descriptive text related to it is omitted.
The above example results in the following citation:[1]
- ↑
Fake.Namespace.FakeClass, method FakeMethod