Difference between revisions of "Template:Time/doc"

From Captain of Industry Wiki
Jump to: navigation, search
(Creation)
 
(Slightly re-order examples)
Line 12: Line 12:


;Usage
;Usage
:To output without 60 highlighting or conversion. Note the second usage has no input parameters -- just call the template.
:To output just a length of time and nothing else.
{{markup|
{{markup|
   <nowiki>{{Time|40}}</nowiki>|
   <nowiki>{{Time|40}}</nowiki>|
   {{Time|40}}|
   {{Time|40}}|
  <nowiki>{{Time}}</nowiki>|
  {{Time}}|
}}
:To output a rate.
{{markup|
   <nowiki>{{Time|40}}</nowiki>|
   <nowiki>{{Time|40}}</nowiki>|
   {{Time|40|20}}|
   {{Time|40|20}}|
  <nowiki>{{Time}}</nowiki>|
  {{Time}}|
   <nowiki>20 {{Time}}</nowiki>|
   <nowiki>20 {{Time}}</nowiki>|
   20 {{Time}}
   20 {{Time}}

Revision as of 06:46, 23 January 2022

Purpose
To provide a quick, shorthand method to refer to lengths of game time and rates of production. Additionally, to automatically do the math to convert from recipe qty/length to per 60 second formats if so desired.
Automations
  • Automatically highlights blue if a per-60 rate is detected (examples for disabling this feature are below)
  • As requested, performs the math to convert to a per-60 second rate and display it already marked up.
Limitations
When an automatic version to a per-60 second rate is performed, the number of digits to round is fixed at 2. For integer results, they are not displayed.
Usage
To output just a length of time and nothing else.
Markup Renders as
{{Time|40}}

/ 40 Clock.png

{{Time}}

/ 60 Clock.png

To output a rate.
Markup Renders as
{{Time|40}}

40 / 20 Clock.png

20 {{Time}}

20 / 60 Clock.png

To output with 60 highlighting, but no conversion.
Markup Renders as
{{Time|60}}

/ 60 Clock 60s.png

{{Time|40|60}}

40 / 60 Clock 60s.png

To output with 60 highlighting and per-60 conversion (ignored when already per-60).
Markup Renders as
{{Time|40|20|per60=y}}

40 / 20 Clock.png (120 / 60 Clock 60s.png)

{{Time|30|60|per60=y}}

30 / 60 Clock 60s.png