Difference between revisions of "Template:Reflector"

From LifeWiki
Jump to navigation Jump to search
m (fixed category functionality and added isosc parameter)
m (fixed problems with categories and added documentation on images)
Line 3: Line 3:
 
| colspan="2" class="infobox_head" | {{{name|Pattern Name}}}
 
| colspan="2" class="infobox_head" | {{{name|Pattern Name}}}
 
|-
 
|-
| colspan="2" class="infobox_img" | <table class="img_border" cellpadding="0"><tr><td>[[Image:{{{pname|Boojumreflector}}}.png|{{{name}}} image]]</td></tr></table>
+
| colspan="2" class="infobox_img" | <table class="img_border" cellpadding="0"><tr><td>[[Image:{{{pname|Buckaroo}}}.png|{{{name}}} image]]</td></tr></table>
 
{{#if: {{{animated|}}} | {{!}}-
 
{{#if: {{{animated|}}} | {{!}}-
 
{{!}} colspan="2" class="infobox_animlink" {{!}} [[Media:{{{pname|name}}}.gif|View animated image]]
 
{{!}} colspan="2" class="infobox_animlink" {{!}} [[Media:{{{pname|name}}}.gif|View animated image]]
Line 12: Line 12:
 
|-
 
|-
 
! Pattern type
 
! Pattern type
| {{#ifeq:{{{type}}}|stable|[[Stable reflector]]|[[Reflector]]{{#ifeq:{{{isosc|}}}|false||<br/>[[Oscillator]]}}}}
+
| {{#ifeq:{{lc:{{{type}}}}}|stable|[[Stable reflector]]|[[Reflector]]{{#ifeq:{{lc:{{{isosc|}}}}}|false||<br />[[Oscillator]]}}}}
 
|-
 
|-
 
! Number of [[cell]]s
 
! Number of [[cell]]s
Line 20: Line 20:
 
| {{#if: {{{bx|}}} | {{{bx}}}&times;{{{by}}} | Unknown }}
 
| {{#if: {{{bx|}}} | {{{bx}}}&times;{{{by}}} | Unknown }}
 
|-
 
|-
! {{#ifeq:{{{type}}}|stable|[[Recovery time]]|[[Period]]}}
+
! {{#ifeq:{{lc:{{{type}}}}}|stable|[[Recovery time]]|[[Period]]}}
| {{#if:{{{p|}}}|[[:Category:{{#ifeq:{{{type|}}}|stable|Stable_reflectors_with_recovery_time|Reflectors_with_period}}_{{{p}}}{{!}}{{{p}}}]]|Unknown}}
+
| {{#if:{{{p|}}}|[[:Category:{{#ifeq:{{lc:{{{type|}}}}}|stable|Stable_reflectors_with_recovery_time_{{{p}}}|Reflectors_with_period}}_{{{p}}}{{!}}{{{p}}}]]|Unknown}}
 
|-
 
|-
 
! Angle
 
! Angle
Line 35: Line 35:
 
This is an infobox template for [[reflector]]s. An example can be seen to the right.
 
This is an infobox template for [[reflector]]s. An example can be seen to the right.
  
'''Special Parameters'''
+
===Special Parameters===
 
*'''type''' only supports "stable"; if it is an oscillating reflector leave this parameter undefined.
 
*'''type''' only supports "stable"; if it is an oscillating reflector leave this parameter undefined.
 
*'''p''' is simply the period of an oscillating reflector; however, for [[stable reflector]]s this is the recovery time.
 
*'''p''' is simply the period of an oscillating reflector; however, for [[stable reflector]]s this is the recovery time.
 
*'''a''' is the angle of the output glider in relation to the input glider (should be one of two values: 90 or 180).
 
*'''a''' is the angle of the output glider in relation to the input glider (should be one of two values: 90 or 180).
 
*'''isosc''' tells whether the reflector can function as an oscillator on its own (some reflectors require a constant stream of gliders). If the pattern can not function as an oscillator on its own this parameter should be "false", otherwise leave it undefined.
 
*'''isosc''' tells whether the reflector can function as an oscillator on its own (some reflectors require a constant stream of gliders). If the pattern can not function as an oscillator on its own this parameter should be "false", otherwise leave it undefined.
</noinclude>
 
  
 +
===Images===
 +
The image in this infobox should '''NOT''' include the glider that is to be reflected (except in the case of reflectors that require a constant stream of gliders); this can be added below in an image gallery. The animation for an oscillating reflector should '''NOT''' show the reflection capabilities of the pattern but merely the oscillator itself (except in the case of patterns that need a constant stream of gliders). Stable reflectors should not have an animated image in this infobox. Instead, an animation of the reflection capabilities (for both stable and oscillating reflectors) can be ''linked to'' in the image gallery. Do '''NOT''' place animated images directly onto the page; instead, consider using a static image of the reflector with a caption that links to the animation. An example is shown below:
 +
 +
==Example image gallery==
 +
{|
 +
|-
 +
|[[Image:Buckarooprereflection.png|framed|left|A [[buckaroo]] reflecting a glider<br />[[Media:Buckarooreflect.gif|View animated image]] ]]
 +
|}</noinclude>
 +
<includeonly>
 
[[Category:Patterns]]
 
[[Category:Patterns]]
 
[[Category:Reflectors]]
 
[[Category:Reflectors]]
{{#ifeq: {{lc:{{{type|}}}}} | stable | [[Category:Stable_reflectors]] {{#if: {{{p|}}} | [[Category:Stable_reflectors_with_recovery_time_{{{p}}}]]}} | {{#if: {{{p|}}} | [[Category:Reflectors_with_period_{{{p}}}]] {{#ifeq:{{lc:{{{isosc|}}}}}|false||[[Category:Oscillators_with_period_{{{p}}}]]}} }} }}{{#if: {{{c|}}} | {{#ifexpr: {{{c|}}} >= 1000 | [[Category:Patterns with 1000 or more cells|{{{c}}}]] | [[Category:Patterns with {{{c}}} cells|{{{c}}}]] }} }}{{#if: {{{a|}}} | [[Category:{{{a}}}_degree_reflectors]]}}{{#if: {{{discoverer|}}} | [[Category:Patterns found by {{{discoverer|}}}]] }}{{#if: {{{discoveryear|}}} | [[Category:Patterns found in {{{discoveryear|}}}]] }} {{#ifeq:{{lc:{{{isosc|}}}}}|false||[[Category:Oscillators]]}}
+
{{#ifeq: {{lc:{{{type|}}}}} | stable | [[Category:Stable_reflectors]] {{#if: {{{p|}}} | [[Category:Stable_reflectors_with_recovery_time_{{{p|}}}]]}} |{{#ifeq:{{lc:{{{isosc|}}}}}|false||[[Category:Oscillators]]}} {{#if: {{{p|}}} | [[Category:Reflectors_with_period_{{{p|}}}]] {{#ifeq:{{lc:{{{isosc|}}}}}|false||[[Category:Oscillators_with_period_{{{p|}}}]]}} }} }}{{#if: {{{c|}}} | {{#ifexpr: {{{c|}}} >= 1000 | [[Category:Patterns with 1000 or more cells|{{{c}}}]] | [[Category:Patterns with {{{c}}} cells|{{{c}}}]] }} }}{{#if: {{{a|}}} | [[Category:{{{a}}}_degree_reflectors]]}}{{#if: {{{discoverer|}}} | [[Category:Patterns found by {{{discoverer|}}}]] }}{{#if: {{{discoveryear|}}} | [[Category:Patterns found in {{{discoveryear|}}}]] }}
 +
</includeonly>

Revision as of 03:15, 29 April 2009

Pattern Name
{{{name}}} image


Pattern type Reflector
Oscillator
Number of cells Unknown
Bounding box Unknown
Period Unknown
Angle Unknown
Discovered by Unknown
Year of discovery Unknown


This is an infobox template for reflectors. An example can be seen to the right.

Special Parameters

  • type only supports "stable"; if it is an oscillating reflector leave this parameter undefined.
  • p is simply the period of an oscillating reflector; however, for stable reflectors this is the recovery time.
  • a is the angle of the output glider in relation to the input glider (should be one of two values: 90 or 180).
  • isosc tells whether the reflector can function as an oscillator on its own (some reflectors require a constant stream of gliders). If the pattern can not function as an oscillator on its own this parameter should be "false", otherwise leave it undefined.

Images

The image in this infobox should NOT include the glider that is to be reflected (except in the case of reflectors that require a constant stream of gliders); this can be added below in an image gallery. The animation for an oscillating reflector should NOT show the reflection capabilities of the pattern but merely the oscillator itself (except in the case of patterns that need a constant stream of gliders). Stable reflectors should not have an animated image in this infobox. Instead, an animation of the reflection capabilities (for both stable and oscillating reflectors) can be linked to in the image gallery. Do NOT place animated images directly onto the page; instead, consider using a static image of the reflector with a caption that links to the animation. An example is shown below:

Example image gallery

A buckaroo reflecting a glider
View animated image