Template:Reagent/doc: Difference between revisions

From Space Station 14 Wiki
Aliser (talk | contribs)
Created page with "== Usage == {{tji|reagent|<name>|<optional amount>}} <br> {{or}} <br> {{tji|r|<name>|<optional amount>}} == Example == {{tji|reagent|nutriment|13}} <br> {{or}} <br> {{tji|r|nutriment|13}} {{gda}} {{reagent|nutriment|13}} <br> {{or}} <br> {{r|nutriment|13}}"
 
Aliser (talk | contribs)
Automatic solution count
 
Line 14: Line 14:
{{or}} <br>
{{or}} <br>
{{r|nutriment|13}}
{{r|nutriment|13}}
== Automatic solution count ==
Every time the template is used on a page, it increments the internal counter for the total solution amount (units).
This total can be used to display, well, the total amount of a solution thus counted.
To use this, put {{t|Reset solution count}} before the count should start. This resets any previous count if there was any. Then, place your solutions with this template.
To retrieve the solution count, use {{t|Solution count}}.
=== Example ===
<syntaxhighlight lang="mediawiki">
<reset> {{Reset solution count}}
Total: {{Solution count}}
* {{r|Nutriment|6}}
* {{r|Amatoxin|3}}
* {{r|Vitamin|4}}
Total: {{Solution count}}
* {{r|Vitamin|10}}
Total: {{Solution count}}
<reset> {{Reset solution count}}
Total: {{Solution count}}
</syntaxhighlight>
{{gda}}
<reset> {{Reset solution count}}
Total: {{Solution count}}
* {{r|Nutriment|6}}
* {{r|Amatoxin|3}}
* {{r|Vitamin|4}}
Total: {{Solution count}}
* {{r|Vitamin|10}}
Total: {{Solution count}}
<reset> {{Reset solution count}}
Total: {{Solution count}}

Latest revision as of 06:03, 4 April 2025

Usage

{{reagent|<name>|<optional amount>}}
or
{{r|<name>|<optional amount>}}

Example

{{reagent|nutriment|13}}
or
{{r|nutriment|13}}

nutriment [13u]
or
nutriment [13u]

Automatic solution count

Every time the template is used on a page, it increments the internal counter for the total solution amount (units).

This total can be used to display, well, the total amount of a solution thus counted.

To use this, put {{Reset solution count}} before the count should start. This resets any previous count if there was any. Then, place your solutions with this template.

To retrieve the solution count, use {{Solution count}}.

Example

<reset> {{Reset solution count}} 

Total: {{Solution count}}

* {{r|Nutriment|6}}
* {{r|Amatoxin|3}}
* {{r|Vitamin|4}}

Total: {{Solution count}}

* {{r|Vitamin|10}}

Total: {{Solution count}}

<reset> {{Reset solution count}} 

Total: {{Solution count}}

<reset>

Total: 0

  • Nutriment [6u]
  • Amatoxin [3u]
  • Vitamin [4u]

Total: 13

  • Vitamin [10u]

Total: 23

<reset>

Total: 0