Template:Infobox engines: Difference between revisions

From Kerbal Space Program 2 Wiki
Jump to navigation Jump to search
Size template param tweak again
Tag: 2017 source edit
simplified formatting
 
(53 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
<templatedata>
{{Documentation}}
{
</noinclude><includeonly>
"params": {
{{Infobox | subbox = yes
"image": {},
| headerstyle  = font-weight: bold; font-size: 18px; text-align: left;
"caption": {},
| labelstyle  = width: 50%; text-align: left;
"size": {
| header20 = {{#if: {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|alt_mode}} | {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|mode_name}} |}}
"label": "Size",
  | label21   = {{#invoke:Data infobox|getFuelLabels|{{PAGENAME}}}}
"description": "Size of part (using {{Size}})",
data21   = {{#invoke:Data infobox|getFuelValues|{{PAGENAME}}}}
"type": "string",
| label22   = Thrust: 1 atm. (kN)
"required": true,
data22   = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|max_thrust|atm}} <small>kN</small>
"suggestedvalues": [
| label23  = Thrust: Vac. (kN)
"XS",
|  data23  = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|max_thrust|vac}} <small>kN</small>
"SM",
| label24  = I<sub>sp</sub>: 1 atm. (s)
"MD",
| data24  = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|isp|atm}} <small>s</small>
"LG",
| label25  = I<sub>sp</sub>: Vac. (s)
"XL",
| data25  = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|isp|vac}} <small>s</small>
"2X"
}}
]
{{#if: {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|alt_mode}}  
},
| {{Infobox | subbox = yes
"max temp (K)": {
  | headerstyle  = font-weight: bold; font-size: 18px; text-align: left;
"label": "Max Temperature (K)",
  | labelstyle  = width: 50%; text-align: left;
"description": "Maximum withstandable engine temperature",
  | header20 = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|alt_mode|mode_name}}
"type": "string",
  | label21  = {{#invoke:Data infobox|getFuelLabels|{{PAGENAME}}|alt}}
"required": true
  | data21  = {{#invoke:Data infobox|getFuelValues|{{PAGENAME}}|alt}}
},
  | label22  = Thrust: 1 atm.
"impact tol (m/s)": {
   |  data22   = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|max_thrust|atm}} <small>kN</small>
"label": "Impact Tolerance (m/s)",
  | label23   = Thrust: Vac.
"description": "Impact Tolerance (m/s)",
  data23   = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|max_thrust|vac}} <small>kN</small>
"type": "string",
  | label24   = I<sub>sp</sub>: 1 atm.
"required": true
  data24  = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|isp|atm}} <small>s</small>
},
  | label25   = I<sub>sp</sub>: Vac.
"mass (t)": {
  data25  = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|isp|vac}} <small>s</small>
"label": "Mass (t)",
  }}
"description": "Mass (t)",
}}
"type": "string",
"required": true
}
},
"description": "Generate an infobox for an engine.",
"paramOrder": [
"image",
"caption",
"mass (t)",
"size",
"max temp (K)",
"impact tol (m/s)"
]
}
</templatedata>
 
{{Infobox
| style = float: right;
| name    = Test
| title    = Test box
| image    = {{{image|}}}
| caption = Test caption
 
| header = Statistics
 
| label1   = Mass (t)
| data1  = #
| label2  = Size
data2   = #
| label3  = Max Temp (K)
| data3  = {{{max temp (K)|#}}}
| label4   = Impact Tolerance (m/s)
data4   = {{{impact tol (m/s)|#}}}
}}
</noinclude>
 
<noinclude>
{{#ifeq:XS|{{{size}}}|<code><b><font color=#E04949>XS</font></b></code>|{{#ifeq:SM|{{{size}}}|<code><b><font color=#E0A400>SM</font></b></code>|{{#ifeq:MD|{{{size}}}|<code><b><font color=#E0A400>MD</font></b></code>|{{#ifeq:LG|{{{size}}}|<code><b><font color=#00E0A8>LG</font></b></code>|{{#ifeq:XL|{{{size}}}|<code><b><font color=#49ABE0>XL</font></b></code>|{{#ifeq:2X|{{{size}}}|<code><b><font color=#A978DA>2X</font></b></code>||}}|}}|}}|}}|}}|}}
</noinclude>
 
<includeonly>
{{Infobox
| name    = {{PAGENAME}}
| title    = {{PAGENAME}}
| image    = {{{image|}}}
| caption = {{{caption|}}}
 
| header  = Statistics
 
| label1   = Mass (t)
data1   = {{{mass (t)|}}}
| label2   = Size
data2   = {{Size|{{{size}}}}}
| label3   = Max Temp (K)
data3  = {{{max temp (K)|}}}
| label4   = Impact Tolerance (m/s)
data4  = {{{impact tol (m/s)|}}}
}}
</includeonly>
</includeonly>

Latest revision as of 23:45, 28 January 2025