Difference between revisions of "Template:Moduletable"

From StarMade Wiki
(updated template)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<table class="wikitable>
 
<table class="wikitable>
{{#if:{{{mod}}}|
 
 
  <tr>
 
  <tr>
   <th style="font-size: 20px; text-align:center">Primary Module</th>
+
   <th style="font-size: 20px; text-align:center; padding:10px">
 +
{{#if:{{{mod|}}}{{{comp|}}}| {{#if: {{{mod|}}}| Primary Module</th>|{{#if: {{{comp|}}}| Primary Computer</th>}} }} | }}
 +
{{#if:{{{inv|}}} |
 +
<th style="font-size: 20px; text-align:center; padding:10px">Inventory Module</th>| }}
 
  </tr>
 
  </tr>
 
  <tr>
 
  <tr>
   <th style="text-align:center">[[{{{mod|}}}]]</th>
+
   <th style="text-align:center">
 +
{{#if:{{{mod|}}}{{{comp|}}}| {{#if: {{{mod|}}}| [[{{{mod|}}}]]</th>|{{#if: {{{comp|}}}| [[{{{comp|}}}]]</th>}} }} | }}
 +
{{#if: {{{inv|}}}|
 +
  <th style="text-align:center"> [[Storage]]</th>| }}
 
  </tr>
 
  </tr>
   <td style="text-align:center">[[file:{{{mod|}}}.png|link={{{mod|}}}|150px]]</td>
+
   <td style="text-align:center">
 +
{{#if:{{{mod|}}}{{{comp|}}}| {{#if: {{{mod|}}}|[[file:{{{mod|}}}.png|link={{{mod|}}}|150px]]</td>| {{#if: {{{comp|}}}| [[file:{{{comp|}}}.png|link={{{comp|}}}|150px]]</td>}} }} | }}
 +
{{#if: {{{inv|}}}|
 +
  <td style="text-align:center">[[File:Storage.png|link=Storage|150px]]</td>| }}
 
  </tr>
 
  </tr>
 
  <tr>
 
  <tr>
   <th style="text-align:center">Connection Method</th>
+
{{#if: {{{inv|}}}|
 +
  <th colspan="2" style="text-align:center">Connection Method</th>|
 +
   <th style="text-align:center">Connection Method</th>}}
 
  </tr>
 
  </tr>
 
  <tr>
 
  <tr>
   <td style="text-align:center; font-size:12px">Select computer with {{k|select module}}<br/> and connect with {{K|cancel ship movement}}</td>
+
{{#if:{{{inv|}}}|
 +
   <td colspan="2" style="text-align:center; font-size:12px; padding:5px">
 +
{{#if: {{{select|}}}{{{add|}}}| {{#if: {{{select|}}}| Select computer with {{k|select module}}<br/> and connect with {{K|cancel ship movement}}</td> | {{#if: {{{add|}}}| Place Adjacent to its computer.</td>}} }} | }}|
 +
  <td style="text-align:center; font-size:12px; padding:5px">
 +
{{#if: {{{select|}}}{{{add|}}}| {{#if: {{{select|}}}| Select computer with {{k|select module}}<br/> and connect with {{K|cancel ship movement}}</td> | {{#if: {{{add|}}}| Place Adjacent to its computer.</td>}} }} | }} }}
 
  </tr>
 
  </tr>
}}
 
 
</table>
 
</table>
 
<noinclude>
 
<noinclude>
{{computertable
+
{{Documentation}}
|mod=Cannon Barrel
+
</noinclude>
}}
 

Latest revision as of 01:14, 28 March 2019




Connection Method
[view] [edit] [history] [[[:Template:Purge]]] 50px Template documentation

This template will create a special table that will highlight a block's computer or its module.

this:

Primary Computer
Cannon Computer
Cannon Computer.png
Connection Method
Select computer with C
and connect with V


will be typed out like this:

{{moduletable
|comp=Cannon Computer
|select=true
}}


This:

Primary Module
Activation Module
Activation Module.png
Connection Method
Place Adjacent to its computer.


will be typed out like this:

{{moduletable
|mod=Activation Module
|add=true
}}

This:

Primary Module Inventory Module
Salvage Module Storage
Salvage Module.png Storage.png
Connection Method
Select computer with C
and connect with V


will be typed out like this:

{{moduletable
|mod=Salvage Module
|select=true
|inv=true
}}

Parameters

comp
Sets the template into computer mode. Will have a header that says "Primary Computer" while displaying the picture and the link to the page of the block typed in.
mod
Sets the template into module mode. Will have a header that says "Primary Module" while displaying the picture and the link to the page of the block typed in.
select
Determines the connection method of the template. Adds an extra row that says that the block must be connected via C and V.
add
Determines the connection method of the template. Adds an extra row that says that the block must be connected via placing it adjacent to its computer.
inv
An optional parameter. Adds an extra cell on the table for Storage.