Difference between revisions of "Template:Rotor"

From LifeWiki
Jump to navigation Jump to search
(add divider)
(Remove user pages from categories)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
<!--  
+
<!--
  
Display "request pattern file" box if no pattern files exist and "nofile" was not passed to suppress this
+
Begin infobox
  
--> <includeonly>{{#if: {{{zip|}}}{{{mc|}}}{{{life105|}}}{{{life106|}}}{{{plaintext|}}}{{{rle|}}}{{{nofile|}}} | | {{requestpatternfile}} }}</includeonly><!--
+
-->{{InfoboxStart
 +
|typename      = Rotor
 +
|defaultconfig = oscillator
 +
|viewerconfig  = {{{viewerconfig|}}}
 +
|name          = {{{name|}}}
 +
|zip          = {{{zip|}}}
 +
|mc            = {{{mc|}}}
 +
|life105      = {{{life105|}}}
 +
|life106      = {{{life106|}}}
 +
|plaintext    = {{{plaintext|}}}
 +
|rle          = {{{rle|}}}
 +
|nofile        = {{{nofile|}}}
 +
|pname        = {{{pname|}}}
 +
|animated      = {{{animated|}}}
 +
}}<!--
  
Begin infobox
+
Display pattern type
  
--> <table class="infobox">
+
--><tr>
<tr><td colspan="2" class="infobox_head"> {{{name|Rotor Name}}} </td></tr>
 
<tr>
 
<td colspan="2" class="infobox_img"><table class="img_border" cellpadding="0"><tr><td>{{#if: {{{zip|}}}{{{mc|}}}{{{life105|}}}{{{life106|}}}{{{plaintext|}}}{{{rle|}}}{{{nofile|}}} | {{#ifexist:RLE:{{{pname}}}|{{LV:Viewer|{{RLE:{{{pname}}}}}
 
{{LifeViewer config/oscillator}}
 
{{#tag:nowiki|{{{viewerconfig|}}}}}|[[Image:{{{pname|}}}.png|{{{name}}} image]]}}|[[Image:{{{pname|}}}.png|{{{name}}} image]]|[[Image:UnknownPattern.png|{{{name}}} image]]}}}}</td></tr></table></td></tr>{{#if: {{{animated|}}} | <tr><td colspan="2" class="infobox_animlink"> [[Media:{{{pname|name}}}.gif|View animated image]]}}<tr><td colspan="2" class="infobox_animlink"> [[Media:{{{pname|name}}}.png|View static image]] </td></tr>
 
<tr>
 
 
<th valign="top"> Pattern type </th>
 
<th valign="top"> Pattern type </th>
<td> {{#if: {{{type|}}} | [[{{{type|}}}]]<br /> }}[[Rotor]] </td></tr>
+
<td> {{#if: {{{type|}}} | [[{{{type|}}}]]<br /> }}[[Rotor]] </td></tr><!--
<tr>
+
 
<th> Number of [[cell]]s </th>
+
Display population and bounding box. Passing catextra= ensures we also get rotor-specific categories, e.g. "Rotors with ... cells".
<td> {{#if: {{{c|}}} | {{#iferror: {{#expr: floor({{{c}}})}} | {{{c}}} | {{#ifexpr: {{{c|}}} >= 1000 | [[:Category:Patterns with 1000 or more cells|{{{c}}}]] | [[:Category:Patterns with {{{c}}} cells|{{{c}}}]] }} }} | Unknown }} </td></tr>
+
 
<tr>
+
-->{{PatternPopulationAndBoundingBox
<th> [[Bounding box]] </th>
+
|c        = {{{c|}}}
<td> {{#if: {{{bx|}}} | {{{bx}}}&times;{{{by}}} | Unknown }} </td></tr>
+
|bx      = {{{bx|}}}
 +
|by      = {{{by|}}}
 +
|catextra = Rotors
 +
}}<!--
 +
 
 +
Display an infobox divider
 +
 
 +
-->{{InfoboxDivider}}
 
<tr>
 
<tr>
 
<th> [[Period#Oscillators|Period]] </th>
 
<th> [[Period#Oscillators|Period]] </th>
Line 65: Line 80:
 
|rulemax      = {{{rulemax|}}}
 
|rulemax      = {{{rulemax|}}}
 
|rulemin      = {{{rulemin|}}}  
 
|rulemin      = {{{rulemin|}}}  
 +
|isorulemax  = {{{isorulemax|}}}
 +
|isorulemin  = {{{isorulemin|}}}
 
}}<!--
 
}}<!--
  
Line 88: Line 105:
  
 
--><includeonly>
 
--><includeonly>
 +
{{#ifeq:{{NAMESPACE}}|User||
 
[[Category:Patterns]]
 
[[Category:Patterns]]
 
[[Category:Rotors]]{{#if: {{{type|}}} | [[Category:{{{type|}}}s]] }}
 
[[Category:Rotors]]{{#if: {{{type|}}} | [[Category:{{{type|}}}s]] }}
{{#if: {{{c|}}} | {{#iferror: {{#expr: floor({{{c}}})}} | | {{#ifexpr: {{{c|}}} >= 1000 | [[Category:Patterns with 1000 or more cells]] [[Category:Rotors with 1000 or more cells]] | [[Category:Patterns with {{{c}}} cells]] [[Category:Rotors with {{{c}}} cells]] }} }} }}{{#if: {{{p|}}} | [[Category:Rotors with period {{{p}}}]] }}{{#if: {{{m|}}} | [[Category:Rotors with mod {{{m|}}}]] }}{{#if: {{{h|}}} | {{#iferror: {{#expr: floor({{{h}}})}} | | [[Category:Rotors with heat {{#expr: floor({{{h}}})}}]] }} }}{{#if: {{{v|}}} | [[Category:Rotors with volatility {{{v}}}]] }}
+
{{#if: {{{p|}}} | [[Category:Rotors with period {{{p}}}]] }}{{#if: {{{m|}}} | [[Category:Rotors with mod {{{m|}}}]] }}{{#if: {{{h|}}} | {{#iferror: {{#expr: floor({{{h}}})}} | | [[Category:Rotors with heat {{#expr: floor({{{h}}})}}]] }} }}{{#if: {{{v|}}} | [[Category:Rotors with volatility {{{v}}}]] }}
 +
}}
 
</includeonly>
 
</includeonly>

Latest revision as of 01:33, 10 December 2018

Rotor Name
image
Pattern type Rotor
Period Unknown
Mod Unknown
Heat Unknown
Volatility Unknown
Discovered by Unknown
Year of discovery Unknown

This is an infobox template for rotors. An example can be seen to the right. For general information about how to use pattern templates, see LifeWiki:Style guide/Pattern layout. To see a live example of this template in action, see Diagonal on-off.

Special parameters

The following parameters are optional and should only be specified if their values are known.

  • p: the period of the rotor (e.g. p=4).
  • m: the mod of the rotor (e.g. m=2).
  • h: the heat of the rotor (e.g. h=4). Decimal values are allowed, though it is most common not to include more than 1 decimal place.
  • v: the volatility of the rotor (e.g. v=0.50). Include 2 digits after the decimal place.

Pattern templates