Template:TechWeb: Difference between revisions

332 bytes added ,  20:22, 20 April 2020
Fixed default-cases not working for empty parameters. Adjusted template to display better default cases for missing / empty parameters (cost/required/unlocks: Nothing - designs: None - techname: Unknown Technology)
(Added an additional linebreak to re-emulate the indirect effect of the now missing category-command (because of which the template most likely is used wrong everywhere).)
(Fixed default-cases not working for empty parameters. Adjusted template to display better default cases for missing / empty parameters (cost/required/unlocks: Nothing - designs: None - techname: Unknown Technology))
Line 2: Line 2:
  |
  |
{|width = "100%" cellspacing="0" cellpadding="2" width=560
{|width = "100%" cellspacing="0" cellpadding="2" width=560
|align=center width="120" style="background-color:#9f88d1"|'''{{{techname|Technology}}}'''
|align=center width="120" style="background-color:#9f88d1"|'''{{#if: {{{techname|}}}|{{{techname}}}|Unknown Technology}}'''
|'''Research Cost: '''{{{cost|List research cost here.}}}
|'''Research Cost: '''{{#if: {{{cost|}}}|{{{cost}}}|Nothing}}
|}
|}
{|width = "100%" cellspacing="0" cellpadding="2" width=560
{|width = "100%" cellspacing="0" cellpadding="2" width=560
|align=center width="120" style="background-color:#9f88d1"|''' ''' [[File:{{{image|pai.png}}}|frameless|120px|center]]
|align=center width="120" style="background-color:#9f88d1"|''' ''' [[File:{{#if: {{{image|}}}|{{{image}}}|pai.png}}|frameless|120px|center]]
|'''Required: '''{{{req|List prerequisite tech here.}}}
|'''Requires: '''{{#if: {{{req|}}}|{{{req}}}|Nothing}}
|}
|}
{|width = "100%" cellspacing="0" cellpadding="2" width=560
{|width = "100%" cellspacing="0" cellpadding="2" width=560
|align=center width="120" style="background-color:#9f88d1"|''' '''
|align=center width="120" style="background-color:#9f88d1"|''' '''
|'''Unlocks: '''{{{unlock|List what the tech unlocks here.}}}
|'''Unlocks: '''{{#if: {{{unlock|}}}|{{{unlock}}}|Nothing}}
|}
|}
{|width = "100%" cellspacing="0" cellpadding="2" width=560
{|width = "100%" cellspacing="0" cellpadding="2" width=560
| style="background-color:#b09fd4" |'''Designs:'''
| style="background-color:#b09fd4" |'''Designs:'''
|-
|-
|{{{designs|List designs here.}}}
|{{#if: {{{designs|}}}|{{{designs}}}|None}}
|}
|}
|}<br></includeonly><noinclude>
|}<br></includeonly><noinclude>
Line 30: Line 30:
!techname
!techname
|Neural Nanite Programming
|Neural Nanite Programming
|Name of the technology
|Name of the technology. Default: Unknown Technology
|-
|-
!image
!image
Line 38: Line 38:
!cost
!cost
|2500
|2500
|Research cost
|Research cost. Default: Nothing
|-
|-
!req
!req
|Biological Nanite Programming
|Biological Nanite Programming
|List of prerequisite technologies
|List of prerequisite technologies. Default: Nothing
|-
|-
!unlock
!unlock
|Synaptic Nanite Programming
|Synaptic Nanite Programming
|List of technologies which are unlocked
|List of technologies which are unlocked. Default: Nothing
|-
|-
!designs
!designs
|Nerve Support, Neural Regeneration, Paralysis, Neural Shock, Host Scan
|Nerve Support, Neural Regeneration, Paralysis, Neural Shock, Host Scan
|List of unlocked designs
|List of unlocked designs. Default: None
|}
|}


== Examples ==
== Examples ==
== Barebones ==
=== Barebones ===
<pre>{{TechWeb}}</pre>
<pre>{{TechWeb}}</pre>
{{TechWeb}}
{{TechWeb}}
=== Verbous Barebones ===
<pre>{{TechWeb
|techname=
|image=
|cost=
|req=
|unlock=
|designs=
}}</pre>
{{TechWeb
|techname=
|image=
|cost=
|req=
|unlock=
|designs=
}}


=== Real-life ===
=== Real-life ===
1,133

edits