Difference between revisions of "Template:Spaceship"

From LifeWiki
Jump to navigation Jump to search
m
(Periodic objects with more than 1000 cells put in that category instead)
(18 intermediate revisions by 4 users 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      = Spaceship
|defaultconfig = spaceship
|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 and related information


--><table class="infobox">
--><tr>
<td colspan="2" class="infobox_head"> {{{name|Spaceship Name}}} </td></tr>
<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}}}}}
{{LifeViewer config/spaceship}}
{{#tag:nowiki|{{{viewerconfig|}}}}}|{{LifeViewer config/spaceship}}}}|[[Image:{{{pname|Glider}}}.png|{{{name}}} image]]}}|[[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]]}}<tr><td colspan="2" class="infobox_animlink"> [[Media:{{{pname|name}}}.png|View static image]]</td></tr>
<!-- {{#if: {{{rle|}}} | <tr><td colspan="2" class="infobox_link"> [http://www.conwaylife.com?p={{{pname|name}}} Manipulate via Java] </td></tr> }} -->
<tr>
<th valign="top"> Pattern type </th>
<th valign="top"> Pattern type </th>
<td> {{#if: {{{type|}}} | [[{{{type|}}}]]<br /> }}[[Spaceship]] </td></tr>
<td> {{#if: {{{type|}}} | [[{{{type|}}}]]<br /> }}[[Spaceship]] </td></tr>
Line 21: Line 28:
<th> Family </th>
<th> Family </th>
<td> [[:Category:{{{family}}} variants|{{{family}}}]] </td></tr>
<td> [[:Category:{{{family}}} variants|{{{family}}}]] </td></tr>
}}
}}<!--
<tr>
 
<th> Number of [[cell]]s </th>
Display population and bounding box
<td> {{#if: {{{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|}}}
|fc      = {{{fc|}}}
|periodic = true
}}<!--
 
Display an infobox divider
 
-->{{InfoboxDivider}}
<tr>
<tr>
<th> [[Direction]] </th>
<th> [[Direction]] </th>
Line 33: Line 48:
{{#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>
}}
}}
Line 45: Line 60:
<th> [[Speed]] </th>
<th> [[Speed]] </th>
<td> {{#if: {{{s|}}} | [[:Category:Spaceships with speed {{{s}}}|{{{s}}}]] | Unknown }} </td></tr>
<td> {{#if: {{{s|}}} | [[:Category:Spaceships with speed {{{s}}}|{{{s}}}]] | Unknown }} </td></tr>
<tr>
<th> [[Speed]] (unsimplified) </th>
<td> {{#if: {{{z|}}} | [[:Category:Spaceships with unsimplified speed {{{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}}} | [[:Category:Spaceships with heat {{#expr: floor({{{h}}})}}|{{{h}}}]] }} | Unknown }} </td></tr><!--
<tr>
 
<th valign="top"> Discovered by </th>
Display an infobox divider
<td> {{#if: {{{discoverer|}}} | [[{{{discoverer|}}}]] | Unknown }}{{#if: {{{discoverer2|}}} | <br />[[{{{discoverer2|}}}]] | }}{{#if: {{{discoverer3|}}} | <br />[[{{{discoverer3|}}}]] | }}{{#if: {{{discoverer4|}}} | <br />[[{{{discoverer4|}}}]] | }}{{#if: {{{discoverer5|}}} | <br />[[{{{discoverer5|}}}]] | }} </td></tr>
 
<tr>
-->{{InfoboxDivider}}<!--
<th> Year of discovery </th>
 
<td> {{#if: {{{discoveryear|}}} | [[:Category:Patterns found in {{{discoveryear|}}}|{{{discoveryear|}}}]] | Unknown }} </td></tr><!--
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
Display "Rules", "Glider synthesis", "Pattern files" sections
Line 60: Line 87:
|synthesis    = {{{synthesis|}}}
|synthesis    = {{{synthesis|}}}
|synthesisRLE = {{{synthesisRLE|}}}
|synthesisRLE = {{{synthesisRLE|}}}
|apgcode      = {{{apgcode|}}}
|life105      = {{{life105|}}}
|life105      = {{{life105|}}}
|life106      = {{{life106|}}}
|life106      = {{{life106|}}}
Line 70: Line 98:
|rulemax      = {{{rulemax|}}}
|rulemax      = {{{rulemax|}}}
|rulemin      = {{{rulemin|}}}  
|rulemin      = {{{rulemin|}}}  
|isorulemax  = {{{isorulemax|}}}
|isorulemin  = {{{isorulemin|}}}
}}<!--
}}<!--


Line 77: Line 107:
|apgcode          = {{{apgcode|}}}
|apgcode          = {{{apgcode|}}}
|niemiecid        = {{{niemiecid|}}}
|niemiecid        = {{{niemiecid|}}}
|pentadecathlonid = {{{pentadecathlonid|}}}  
|pentadecathlonid = {{{pentadecathlonid|}}}
|eppsteinid      = {{{eppsteinid|}}}
}}<!--
}}<!--


Line 93: Line 124:


--><includeonly>
--><includeonly>
{{#ifeq:{{NAMESPACE}}|User||
[[Category:Patterns]]
[[Category:Patterns]]
[[Category:Spaceships]]
[[Category:Spaceships]]
{{#if: {{{type|}}} | [[Category:{{pluralize|{{{type|}}}}}]] }}{{#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}}}]] | [[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: {{{h|}}} | {{#iferror: {{#expr: floor({{{h}}})}} | | [[Category:Spaceships with heat {{#expr: floor({{{h}}})}}]] }} | [[Category:Spaceships with unknown heat]] }}{{#if: {{{discoverer|}}} | [[Category:Patterns found by {{{discoverer|}}}]] }}{{#if: {{{discoverer2|}}} | [[Category:Patterns found by {{{discoverer2|}}}]] }}{{#if: {{{discoverer3|}}} | [[Category:Patterns found by {{{discoverer3|}}}]] }}{{#if: {{{discoverer4|}}} | [[Category:Patterns found by {{{discoverer4|}}}]] }}{{#if: {{{discoverer5|}}} | [[Category:Patterns found by {{{discoverer5|}}}]] }}{{#if: {{{discoveryear|}}} | [[Category:Patterns found in {{{discoveryear|}}}]] }}{{#if: {{{family|}}} | [[Category:{{{family|}}} variants]] }}{{#if: {{{m|}}} | [[Category:Spaceships with mod {{{m|}}}]] | [[Category:Spaceships with unknown mod]] }}{{#ifexist:RLE:{{{pname}}}|{{#if:{{{viewerconfig|}}}||[[Category:Patterns with RLE snippets but no LifeViewer configuration]]}}}}{{#if: {{{apgcode|}}} | | [[Category:Spaceships with no apgcode infobox parameter]] }}
{{#if: {{{type|}}} | [[Category:{{pluralize|{{{type|}}}}}]] }}{{#if: {{{c|}}} | {{#ifexpr: {{{c|}}} < 1000 | [[Category:Periodic objects with minimum population {{{c}}}]] }} | [[Category:Periodic objects with unknown minimum 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 {{#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]] }}{{#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>
}}</includeonly>

Revision as of 17:17, 27 April 2019

Spaceship Name
image
Pattern type Spaceship
Direction Unknown
Period Unknown
Mod Unknown
Speed Unknown
Speed (unsimplified) Unknown
Heat Unknown
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