Difference between revisions of "Template:B/doc"

From RimWorld Wiki
Jump to navigation Jump to search
(Documentation created. This template is not used on anything not obsolete, so it may not help much. Perhaps it will have a use now that it is clear what it does.)
 
 
Line 13: Line 13:
  
 
As of 28/02/2025, all the uses of this template are considered Obsolete.
 
As of 28/02/2025, all the uses of this template are considered Obsolete.
 +
 +
== Example ==
 +
<nowiki>{{B|Muffalo|Can Train Attack|Yes|No}}</nowiki> results in:
 +
 +
{{B|Muffalo|Can Train Attack|Yes|No}}
 +
 +
<nowiki>{{B|Timber wolf|Can Train Attack|Yes|No}}</nowiki> results in:
 +
 +
{{B|Timber wolf|Can Train Attack|Yes|No}}
 +
 
<includeonly>[[Category:SMW templates]]</includeonly>
 
<includeonly>[[Category:SMW templates]]</includeonly>
 
<noinclude>[[Category:Template documentation]]</noinclude>
 
<noinclude>[[Category:Template documentation]]</noinclude>

Latest revision as of 22:55, 28 February 2025

This template takes 4 arguments:

{{B| {{{1}}} | {{{2}}} | {{{3}}} | {{{4}}} }}

In order:

  • 1: The element to search
  • 2: The property to search
  • 3: First element to return
  • 4: Second element to return

What this template does:

  • It shows the {{{2}}} property of the {{{1}}} element via the Template:Q.
  • If the property above is equal to True, it returns {{{4}}}. Otherwise, it returns {{{3}}}.
  • Both {{{3}}} and {{{4}}} default to empty, if not defined.

As of 28/02/2025, all the uses of this template are considered Obsolete.

Example[edit]

{{B|Muffalo|Can Train Attack|Yes|No}} results in:


Yes

{{B|Timber wolf|Can Train Attack|Yes|No}} results in:


No