Template:Infobox engines: Difference between revisions

From Kerbal Space Program 2 Wiki
Jump to navigation Jump to search
Undo revision 974 by KiwiShark (talk)
Tag: Undo
simplified formatting
 
(27 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;
"aliases": [
| labelstyle  = width: 50%; text-align: left;
"picture",
  | header20 = {{#if: {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|alt_mode}} | {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|mode_name}} |}}
"thumbnail"
| label21   = {{#invoke:Data infobox|getFuelLabels|{{PAGENAME}}}}
],
  |  data21   = {{#invoke:Data infobox|getFuelValues|{{PAGENAME}}}}
"label": "Part Image",
| label22   = Thrust: 1 atm. (kN)
"description": "The filename of the part, including the file extension",
data22   = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|max_thrust|atm}} <small>kN</small>
"example": "LV-3000_Tuba.png",
| label23   = Thrust: Vac. (kN)
"type": "wiki-file-name",
data23   = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|max_thrust|vac}} <small>kN</small>
"required": true
| label24   = I<sub>sp</sub>: 1 atm. (s)
},
data24 = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|isp|atm}} <small>s</small>
"caption": {
| label25   = I<sub>sp</sub>: Vac. (s)
"aliases": [
data25 = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|isp|vac}} <small>s</small>
"subtitle"
}}
],
{{#if: {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|alt_mode}}  
"label": "Caption",
| {{Infobox | subbox = yes
"description": "The part's classification per the in-game description.",
   | headerstyle  = font-weight: bold; font-size: 18px; text-align: left;
"example": "Deep Space Hydrogen Engine",
  | labelstyle  = width: 50%; text-align: left;
"type": "string",
   | header20 = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|alt_mode|mode_name}}
"required": true
   | label21   = {{#invoke:Data infobox|getFuelLabels|{{PAGENAME}}|alt}}
},
   |  data21   = {{#invoke:Data infobox|getFuelValues|{{PAGENAME}}|alt}}
"size": {
   | label22   = Thrust: 1 atm.
"label": "Size",
  data22   = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|max_thrust|atm}} <small>kN</small>
"description": "Size of part (using {{Size}})",
  | label23   = Thrust: Vac.
"type": "string",
  data23   = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|max_thrust|vac}} <small>kN</small>
"required": true,
  | label24   = I<sub>sp</sub>: 1 atm.
"suggestedvalues": [
  data24 = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|isp|atm}} <small>s</small>
"XS",
  | label25   = I<sub>sp</sub>: Vac.
"SM",
  data25 = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|isp|vac}} <small>s</small>
"MD",
  }}
"LG",
}}
"XL",
"2X"
]
},
"max temp": {
"label": "Max Temperature (K)",
"description": "Maximum withstandable engine temperature",
"type": "string",
"required": true
},
"impact tol": {
"label": "Impact Tolerance (m/s)",
"description": "The velocity at which a collision will destroy this part.",
"type": "string",
"required": true
},
"mass": {
"label": "Mass (t)",
"description": "Mass (t)",
"type": "string",
"required": true
},
"fuel type": {
"aliases": [
"fuel"
],
"label": "Fuel Type",
"description": "The fuel this engine burns.",
"type": "string",
"suggestedvalues": [
"Methalox",
"Methane",
"Monopropellant",
"Solid Fuel",
"Hydrogen",
"Xenon"
],
"required": true
},
"vacuum thrust": {
"aliases": [
"vac thrust",
"thrust vac"
],
"label": "Thrust (Vacuum)",
"description": "The max thrust this engine creates in vacuum.",
"type": "string",
"required": true
},
"vacuum isp": {
"aliases": [
"vac isp",
"isp vac"
],
"label": "Isp (Vac.)",
"description": "The specific impulse of this engine in vacuum.",
"type": "string",
"required": true
},
"manufacturer": {
"aliases": [
"maker",
"brand"
],
"label": "Manufacturer",
"description": "The in-game manufacturer of the part.",
"example": "Jebediah's Junkyard",
"type": "string",
"required": true,
"suggestedvalues": [
"Found Lying By the Side of the Road",
"Jebediah Kerman's Junkyard and Spacecraft Parts Co.",
"Kerlington Model Rockets and Paper Products Inc",
"O.M.B. Demolition Enterprises",
"Wingit Enterprises",
"Goliath National Products",
"Rockomax Conglomerate",
"Zaltronic Electronics",
"Ionic Symphonic Protonic Electronics",
"Bob's Girders",
"C7 Aerospace Division",
"Lightyear Tire Company",
"Experimental Engineering Group",
"Sean's Cannery",
"Flooyd Dynamics Research Labs",
"Probodobodyne Inc",
"Steadler Engineering Corps.",
"Reaction Systems Ltd.",
"Stratus Corporation",
"Kerbodyne",
"Kerbal Motion LLC",
"Moving Parts Experts Group",
"Rokea Inc.",
"Urika Inc.",
"Shakeproof Atomic Fusion Engines",
"Tubular Tubes",
"Winterowl Aircraft Emporium",
"Seabug Sciences",
"Coop's Connectors",
"[TBD]"
]
},
"atm thrust": {
"label": "Thrust (1 atm)",
"description": "The max thrust this engine creates at 1 atmosphere of pressure.",
"type": "string",
"required": true
},
"atm isp": {
"label": "Isp (1 atm)",
"description": "The specific impulse of this engine at 1 atmosphere of pressure.",
"type": "string",
"required": true
}
},
"description": "Generate an infobox for an engine. Units are included in data labels, they do not have to be provided.",
"paramOrder": [
"image",
"caption",
"mass",
"size",
"max temp",
"impact tol",
"manufacturer",
"fuel type",
"atm thrust",
"vacuum thrust",
"atm isp",
"vacuum isp"
]
}
</templatedata>
 
{{Infobox  
| name    = Test
| title    = {{#invoke:Data|getData|Example/engine|name}}
| image    = [[File:LV-SW_SWERV.png|200px|center]]
| caption = {{#invoke:Data|getData|Example/engine|subtitle}}
 
| labelstyle = width: 33%; text-align: left;
| titlestyle = background-color: #f7aa33;
padding: 0.2em 0em 0.2em;
color: black;
font-size: 22px;
font-weight: bold;
| bodystyle  = width: 20em; border: 1px solid #a2a9b1; border-spacing: 3px; margin: 0.5em 0 0.5em 1em;
    padding: 0.2em;
    float: right;
    clear: right;
    font-size: 88%;
    line-height: 1.5em;
    width: 20em;
| headerstyle  = font-weight: bold; color: black; background: #f7aa33; font-size: 18px; text-align: left;
| captionstyle = text-align: center; font-style: italic;
 
| header1 = Statistics
| label2  = Mass (t)
|  data2  = {{#invoke:Data|getData|Example/engine|mass}}
| label3  = Size
| data3  = {{Size|Size={{#invoke:Data|getData|Example/engine|size}}}}
| label4  = Max Temp (K)
|  data4  = {{#invoke:Data|getData|Example/engine|max_temp}}
| label5  = Impact Tolerance (m/s)
| data5   = {{#invoke:Data|getData|Example/engine|imp_tol}}
 
| header6 = Engine Info
| label7  = Fuel
data7   = {{#invoke:Data|getEngineFuel|Example/engine}}
| label8   = Thrust: 1 atm. (kN)
data8   = {{#invoke:Data|getData|Example/engine|modules|engine|max_thrust|atm}}
| label9   = Thrust: Vac. (kN)
data9   = {{#invoke:Data|getData|Example/engine|modules|engine|max_thrust|vac}}
| label10   = I<sub>sp</sub>: 1 atm. (s)
data10 = {{#invoke:Data|getData|Example/engine|modules|engine|isp|atm}}
| label11   = I<sub>sp</sub>: Vac. (s)
data11 = {{#invoke:Data|getData|Example/engine|modules|engine|isp|vac}}
 
| below    = {{#invoke:Data|getData|Example/engine|manufacturer}}
 
}}
</noinclude>
<includeonly>
{{Infobox
| name    = {{PAGENAME}}
| title    = {{PAGENAME}}
| image    = [[File:{{{image|}}}|200px|center]]
| caption = {{#invoke:Data|getData|{{PAGENAME}}|subtitle}}
 
| labelstyle  = width: 33%; text-align: left;
| titlestyle = background-color: #f7aa33;
padding: 0.2em 0em 0.2em;
color: black;
font-size: 22px;
font-weight: bold;
| bodystyle   = width: 20em; border: 1px solid #a2a9b1; border-spacing: 3px; margin: 0.5em 0 0.5em 1em;
    padding: 0.2em;
    float: right;
    clear: right;
    font-size: 88%;
    line-height: 1.5em;
    width: 20em;
| headerstyle  = font-weight: bold; color: black; background: #f7aa33; font-size: 18px; text-align: left;
| captionstyle = text-align: center; font-style: italic;
 
| header1  = Statistics
 
| label2   = Mass (t)
| data2  = {{#invoke:Data|getData|{{PAGENAME}}|mass}}
| label3  = Size
|  data3  = {{Size|Size={{#invoke:Data|getData|{{PAGENAME}}|size}}}}
| label4   = Max Temp (K)
| data4   = {{#invoke:Data|getData|{{PAGENAME}}|max_temp}}
| label5   = Impact Tolerance (m/s)
data5   = {{#invoke:Data|getData|{{PAGENAME}}|imp_tol}}
 
| header6  = Engine Info
| label7   = Fuel
| data7  = {{#invoke:Data|getEngineFuel|{{PAGENAME}}}}
| label8   = Thrust: 1 atm. (kN)
data8   = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|max_thrust|atm}}
| label9   = Thrust: Vac. (kN)
data9   = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|max_thrust|vac}}
| label10   = I<sub>sp</sub>: 1 atm. (s)
data10 = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|isp|atm}}
| label11   = I<sub>sp</sub>: Vac. (s)
data11 = {{#invoke:Data|getData|{{PAGENAME}}|modules|engine|isp|vac}}
 
| below    = {{#invoke:Data|getData|{{PAGENAME}}|manufacturer}}
 
}}
</includeonly>
</includeonly>

Latest revision as of 23:45, 28 January 2025