Template:Infobox engines: Difference between revisions

From Kerbal Space Program 2 Wiki
Jump to navigation Jump to search
header style changes, param name changes, moving some of this to the usable template section
Tag: 2017 source edit
simplified formatting
 
(46 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": {
   | 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": {
  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": {
   |  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",
"size",
"max temp",
"impact tol"
]
}
</templatedata>
 
{{Infobox
| name    = Test
| title    = Test box
| image    = {{{image|}}}
| caption = Test caption
 
| labelstyle = width: 33%
| bodystyle   = width: 20em
| headerstyle = font-weight: bold; color: black; background: #f7aa33;
 
| header1 = Statistics
| label2   = Mass (t)
data2   = #
| label3  = Size
| data3  = #
| label4   = Max Temp (K)
data4   = {{{max temp|#}}}
| label5   = Impact Tolerance (m/s)
data5  = {{{impact tol|#}}}
 
| header6 = Engine Info
| label7   = Fuel
data7  = #
| label8  = Thrust
| data8  = #
 
| below    = Undertext
 
}}
</noinclude>
 
<includeonly>
{{Infobox
| name    = {{PAGENAME}}
| title    = {{PAGENAME}}
| image    = {{{image|}}}
| caption = {{{caption|}}}
 
| labelstyle  = width: 33%
| bodystyle   = width: 20em
| headerstyle  = font-weight: bold; color: black; background: #f7aa33;
 
| header1 = Statistics
 
| label2   = Mass (t)
data2   = {{{mass|}}}
| label3   = Size
data3   = {{Size|Size={{{size|}}}|Add Category=1}}
| label4   = Max Temp (K)
data4   = {{{max temp|}}}
| label5   = Impact Tolerance (m/s)
data5  = {{{impact tol|}}}
 
 
| header6  = Engine Info
| label7   = Fuel
data7  =  
| label8   = Thrust
| data8  =
}}
</includeonly>
</includeonly>

Latest revision as of 23:45, 28 January 2025