Template:Spaceship: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
m Fix RLE: namespace inclusion
mNo edit summary
 
(69 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<includeonly>{{#if: {{{zip|}}}{{{mc|}}}{{{life105|}}}{{{life106|}}}{{{plaintext|}}}{{{rle|}}}{{{nofile|}}} | | {{requestpatternfile}} }}</includeonly>
<!--
<table class="infobox"><tr>
 
<td colspan="2" class="infobox_head"> {{{name|Spaceship Name}}} </td></tr>
Begin infobox
<tr>
 
<td colspan="2" class="infobox_img"><table class="img_border" cellpadding="0"><tr><td>{{#if: {{{zip|}}}{{{life105|}}}{{{life106|}}}{{{plaintext|}}}{{{rle|}}}{{{nofile|}}}{{{mc|}}} | {{#ifexist:RLE:{{{pname}}}|{{LV:Viewer|{{:RLE/{{{pname}}}}}
-->{{InfoboxStart
{{#ifexist:Template:LifeViewer config/{{{pname}}}|{{LifeViewer config/{{{pname}}}}}|{{LifeViewer config/spaceship}}}}}}|[[Image:{{{pname|Glider}}}.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]]}}{{#ifexist: Media:{{{pname}}}.png | <tr><td colspan="2" class="infobox_animlink"> [[Media:{{{pname|name}}}.png|View static image]]</td></tr>|}}
|typename      = Spaceship
<!-- {{#if: {{{rle|}}} | <tr><td colspan="2" class="infobox_link"> [http://www.conwaylife.com?p={{{pname|name}}} Manipulate via Java] </td></tr> }} -->
|defaultconfig = spaceship
<tr>
|viewerconfig  = {{{viewerconfig|}}}
<th> Pattern type </th>
|name          = {{{name|}}}
|zip          = {{{zip|}}}
|mc            = {{{mc|}}}
|life105      = {{{life105|}}}
|life106      = {{{life106|}}}
|plaintext    = {{{plaintext|}}}
|rle          = {{{rle|}}}
|nofile        = {{{nofile|}}}
|pname        = {{{pname|}}}
|animated     = {{{animated|}}}
|hideimg      = {{{hideimg|}}}
}}<!--
 
Display pattern type and related information
 
--><tr>
<th valign="top"> Pattern type </th>
<td> {{#if: {{{type|}}} | [[{{{type|}}}]]<br /> }}[[Spaceship]] </td></tr>
<td> {{#if: {{{type|}}} | [[{{{type|}}}]]<br /> }}[[Spaceship]] </td></tr>
{{#if: {{{family|}}} |
<tr>
<tr>
<th> Number of [[cell]]s </th>
<th> Family </th>
<td> {{#if: {{{c|}}} | {{#ifexpr: {{{c|}}} >= 1000 | [[:Category:Patterns with 1000 or more cells|{{{c}}}]] | [[:Category:Patterns with {{{c}}} cells|{{{c}}}]] }} | Unknown }} </td></tr>
<td> {{#ifeq:{{NAMESPACE}}||[[:Category:{{{family}}} variants|{{{family}}}]]|{{{family}}}}} </td></tr>
}}<!--
 
Display population and bounding box. Passing catextra= ensures we also get spaceship-specific categories, e.g. "Spaceships with ... cells".
 
-->{{PatternPopulationAndBoundingBox
|c        = {{{c|}}}
|bx      = {{{bx|}}}
|by      = {{{by|}}}
|fc      = {{{fc|}}}
|catextra = Spaceships
|periodic = true
}}<!--
 
Display an infobox divider
 
-->{{InfoboxDivider}}
<tr>
<tr>
<th> [[Bounding box]] </th>
<th> [[Direction]] </th>
<td> {{#if: {{{bx|}}} | {{{bx}}}&times;{{{by}}} | Unknown }} </td></tr>
<td> {{#if: {{{dir|}}} | {{#ifeq:{{NAMESPACE}}||[[:Category:{{{dir}}} spaceships|{{{dir}}}]]|{{{dir}}}}} | Unknown }} </td></tr>
<tr>
<th> Direction </th>
<td> {{#if: {{{dir|}}} | [[:Category:{{{dir}}} spaceships|{{{dir}}}]] | Unknown }} </td></tr>
{{#if: {{{slope|}}} |  
{{#if: {{{slope|}}} |  
<tr>
<tr>
<th> Slope </th>
<th> [[Slope]] </th>
<td> [[:Category:Spaceships with slope {{{slope}}}|{{{slope}}}]] </td></tr>
<td> [[:Category:Spaceships with slope {{{slope}}}|{{{slope}}}]] </td></tr>
}}
}}
<tr>
<tr>
<th> [[Period#Spaceships|Period]] </th>
<th> [[Period#Spaceships|Period]] </th>
<td> {{#if: {{{p|}}} | [[:Category:Spaceships with period {{{p}}}|{{{p}}}]] | Unknown }} </td></tr>
<td> {{#if: {{{p|}}} | {{#if: {{NAMESPACE}} | {{{p}}} | [[:Category:Spaceships with period {{{p}}}|{{{p}}}]] }} | Unknown }} ([[mod]]: {{#if: {{{m|}}} | {{#if: {{NAMESPACE}} | {{{m}}} | [[:Category:Spaceships with mod {{{m}}}|{{{m}}}]] }} | Unknown }}) </td></tr>
<tr>
<tr>
<th> [[Speed]] </th>
<th> [[Speed]] </th>
<td> {{#if: {{{s|}}} | [[:Category:Spaceships with speed {{{s}}}|{{{s}}}]] | Unknown }} </td></tr>
<td> {{#if: {{{s|}}} | {{#ifeq:{{NAMESPACE}}||[[:Category:Spaceships with speed {{{s}}}|{{{s}}}]]|{{{s}}}}} | Unknown }} <nowiki> | </nowiki> {{#if: {{{z|}}} | {{#ifeq:{{NAMESPACE}}||[[:Category:Spaceships with unsimplified speed {{{z}}}|{{{z}}}]]|{{{z}}}}} | Unknown }} </td></tr>
<tr>
<tr>
<th> [[Heat]] </th>
<th> [[Heat]] </th>
<td> {{#if: {{{h|}}} | {{#iferror: {{#expr: floor({{{h}}})}} | {{{h}}} | [[:Category:Spaceships with heat {{#expr: floor({{{h}}})}}|{{{h}}}]] }} | Unknown }} </td></tr>
<td> {{#if: {{{h|}}} | {{#iferror: {{#expr: floor({{{h}}})}} | {{{h}}} | {{#ifeq:{{NAMESPACE}}||[[:Category:Spaceships with heat {{CellsCategoryName|{{#expr: floor({{{h}}})}}}}|{{{h}}}]]|{{{h}}}}} }} | Unknown }} </td></tr>
<tr>
<tr>
<th> Discovered by </th>
<th> [[Kinetic symmetry]] </th>
<td> {{#if: {{{discoverer|}}} | [[:Category:Patterns found by {{{discoverer|}}}|{{{discoverer|}}}]] | Unknown }} </td></tr>
<td> {{#if: {{NAMESPACE}} | {{{symmetry|Unspecified}}} | {{#if: {{{symmetry|}}} | [[:Category:Spaceships with {{{symmetry}}} symmetry|{{{symmetry}}}]] | Unspecified }} | Unspecified }} </td></tr><!--
<tr>
 
<th> Year of discovery </th>
Display an infobox divider
<td> {{#if: {{{discoveryear|}}} | [[:Category:Patterns found in {{{discoveryear|}}}|{{{discoveryear|}}}]] | Unknown }} </td></tr>{{PatternDownload|synthesis={{{synthesis|}}}|synthesisRLE={{{synthesisRLE|}}}|life105={{{life105|}}}|life106={{{life106|}}}|plaintext={{{plaintext|}}}|zip={{{zip|}}}|rle={{{rle|}}}|pname={{{pname|}}}|rulespecial={{{rulespecial|}}}|rulemax={{{rulemax|}}}|rulemin={{{rulemin|}}}|mc={{{mc|}}} }} </table>
 
<noinclude>
-->{{InfoboxDivider}}<!--
This is an infobox template for '''[[spaceship]]s'''. 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 [[glider]].
 
Display discoverers and year of discovery
 
-->{{PatternDiscovery
|discoverer  = {{{discoverer|}}}
|discoverer2  = {{{discoverer2|}}}
|discoverer3  = {{{discoverer3|}}}
|discoverer4  = {{{discoverer4|}}}
|discoverer5  = {{{discoverer5|}}}
|discoveryear = {{{discoveryear|}}}
}}<!--
 
Display "Rules", "Glider synthesis", "Pattern files" sections
 
-->{{PatternDownload
|synthesis   = {{{synthesis|}}}
|synthesis2  = {{{synthesis2|}}}
|synthesisRLE = {{{synthesisRLE|}}}
|apgcode      = {{{apgcode|}}}
|apgcode2    = {{{apgcode2|}}}
|life105     = {{{life105|}}}
|life106     = {{{life106|}}}
|plaintext   = {{{plaintext|}}}
|zip         = {{{zip|}}}
|mc          = {{{mc|}}}
|rle         = {{{rle|}}}
|pname       = {{{pname|}}}
|rulespecial = {{{rulespecial|}}}
|rulemax     = {{{rulemax|}}}
|rulemin     = {{{rulemin|}}}  
|isorulemax  = {{{isorulemax|}}}
|isorulemin  = {{{isorulemin|}}}
}}<!--
 
Display "Identifiers" section
 
-->{{PatternIdentifiers
|apgcode          = {{{apgcode|}}}
|apgcode2        = {{{apgcode2|}}}
|niemiecid        = {{{niemiecid|}}}
|pentadecathlonid = {{{pentadecathlonid|}}}
|eppsteinid      = {{{eppsteinid|}}}
}}<!--
 
End infobox
 
--></table><!--


==Special parameters==
Transcluded documentation
The following parameters are optional and should only be specified if their values are known.
*'''dir''': the direction of the spaceship (either dir=Orthogonal, dir=Diagonal or dir=Oblique).
*'''slope''': the slope of the spaceship (for dir=Oblique only, e.g. slope=5).
*'''h''': the [[heat]] of the spaceship (e.g. h=4).
*'''p''': the period of the spaceship (e.g. p=4).
*'''s''': the speed of the spaceship (e.g. s=c/4).
*'''type''': a subcategory of spaceships &ndash; leave blank for a normal spaceship or if you're unsure. The only supported value currently is "type=Puffer engine".


--><noinclude>{{Spaceship/Doc}}
{{PatternTemplates}}
{{PatternTemplates}}
</noinclude>
</noinclude><!--
<includeonly>
 
Categories
 
--><includeonly>
{{#ifeq:{{NAMESPACE}}||
[[Category:Patterns]]
[[Category:Patterns]]
[[Category:Spaceships]]{{#if: {{{type|}}} | [[Category:{{{type|}}}s]] }}{{#if: {{{c|}}} | {{#ifexpr: {{{c|}}} >= 1000 | [[Category:Patterns with 1000 or more cells|{{{c}}}]] | [[Category:Patterns with {{{c}}} cells|{{{c}}}]] }} }}{{#if: {{{p|}}} | [[Category:Spaceships with period {{{p}}}]] }}{{#if: {{{dir|}}} | [[Category:{{{dir}}} spaceships]] }}{{#if: {{{slope|}}} | [[Category:Spaceships with slope {{{slope}}}]] }}{{#if: {{{s|}}} | [[Category:Spaceships with speed {{{s}}}]] }}{{#if: {{{h|}}} | {{#iferror: {{#expr: floor({{{h}}})}} | | [[Category:Spaceships with heat {{#expr: floor({{{h}}})}}]] }} }}{{#if: {{{discoverer|}}} | [[Category:Patterns found by {{{discoverer|}}}]] }}{{#if: {{{discoveryear|}}} | [[Category:Patterns found in {{{discoveryear|}}}]] }}
[[Category:Spaceships]]
</includeonly>
{{#if: {{{type|}}} | [[Category:{{pluralize|{{{type|}}}}}]] }}{{#if: {{{c|}}} | | [[Category:Patterns with unknown population]] }}{{#if: {{{p|}}} | [[Category:Spaceships with period {{{p}}}]] | [[Category:Spaceships with unknown period]] }}{{#if: {{{dir|}}} | [[Category:{{{dir}}} spaceships]] | [[Category:Spaceships with unknown direction]] }}{{#if: {{{slope|}}} | [[Category:Spaceships with slope {{{slope}}}]] | {{#ifeq: {{lc:{{{dir|}}}}} | oblique | [[Category:Oblique spaceships with unknown slope]] }} }}{{#if: {{{s|}}} | [[Category:Spaceships with speed {{{s}}}]] | [[Category:Spaceships with unknown speed]] }}{{#if: {{{z|}}} | [[Category:Spaceships with unsimplified speed {{{z}}}]] | [[Category:Spaceships with unknown unsimplified speed]] }}{{#if: {{{h|}}} | {{#iferror: {{#expr: floor({{{h}}})}} | | [[Category:Spaceships with heat {{CellsCategoryName|{{#expr: floor({{{h}}})}}}}]] }} | [[Category:Spaceships with unknown heat]] }}{{#if: {{{family|}}} | [[Category:{{{family|}}} variants]] }}{{#if: {{{m|}}} | [[Category:Spaceships with mod {{{m|}}}]] | [[Category:Spaceships with unknown mod]] }}{{#if: {{{symmetry|}}} | [[Category:Spaceships with {{{symmetry|}}} symmetry]] | [[Category:Spaceships with unknown symmetry]] }}{{#ifexist:RLE:{{{pname}}}|{{#if: {{{viewerconfig|}}} | | [[Category:Patterns with RLE snippets but no LifeViewer configuration]] }} }}{{#if: {{{apgcode|}}} | | [[Category:Spaceships with no apgcode infobox parameter]] }}{{#if: {{{pentadecathlonid|}}} | | {{#ifeq: {{{type|}}} | constellation | | [[Category:Spaceships with no Pentadecathlon ID]] }} }}
|}}</includeonly>

Latest revision as of 18:55, 9 August 2024

Spaceship Name
image
Pattern type Spaceship
Direction Unknown
Period Unknown (mod: Unknown)
Speed Unknown | Unknown
Heat Unknown
Kinetic symmetry Unspecified
Discovered by Unknown
Year of discovery Unknown

This is an infobox template for spaceships. 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 glider.

Special parameters

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

  • dir: the direction of the spaceship (either dir=Orthogonal, dir=Diagonal, or dir=Oblique).
  • slope: the slope of the spaceship (for dir=Oblique only, e.g. slope=5).
  • h: the heat of the spaceship (e.g. h=4).
  • p: the period of the spaceship (e.g. p=4).
  • m: the mod of the spaceship (e.g. m=2).
  • s: the speed of the spaceship (e.g. s=c/4).
  • type: a subcategory of spaceships – leave blank for a normal spaceship or if you're unsure. The only supported value currently is "type=Puffer engine".


Pattern templates