Template:Infobox engines: Difference between revisions

From Kerbal Space Program 2 Wiki
Jump to navigation Jump to search
fix infobox element numeration
Tag: 2017 source edit
Sample table now supports alt mode info display. Parser #if: function uses presence of an alt_mode in the JSON
Tag: 2017 source edit
Line 36: Line 36:
| data21 = {{Infobox | subbox = yes
| data21 = {{Infobox | subbox = yes
  | headerstyle  = font-weight: bold; color: black; background: #f7aa33; font-size: 18px; text-align: left;
  | headerstyle  = font-weight: bold; color: black; background: #f7aa33; font-size: 18px; text-align: left;
  | labelstyle  = width: 33%; text-align: left;
  | labelstyle  = width: 50%; text-align: left;
  |header20 = Mode 1
  |header20 = {{#if: {{#invoke:Data|getData|Example/engine|modules|engine|alt_mode}} | {{#invoke:Data|getData|Example/engine|modules|engine|alt_mode|mode_name}} |}}
  | label21  = Fuel
  | label21  = Fuel
  |  data21  = {{#invoke:Data|getEngineFuel|Example/engine}}
  |  data21  = {{#invoke:Data|getEngineFuel|Example/engine}}
Line 49: Line 49:
  |  data25  = {{#invoke:Data|getData|Example/engine|modules|engine|isp|vac}}
  |  data25  = {{#invoke:Data|getData|Example/engine|modules|engine|isp|vac}}
  }}
  }}
| data22 = {{Infobox | subbox = yes
{{#if: {{#invoke:Data|getData|Example/engine|modules|engine|alt_mode}} | data22 = {{Infobox | subbox = yes
  | headerstyle  = font-weight: bold; color: black; background: #f7aa33; font-size: 18px; text-align: left;
  | headerstyle  = font-weight: bold; color: black; background: #f7aa33; font-size: 18px; text-align: left;
  | labelstyle  = width: 33%; text-align: left;
  | labelstyle  = width: 50%; text-align: left;
  |header20 = Mode 2
  |header20 = {{#invoke:Data|getData|Example/engine|modules|engine|alt_mode|mode_name}}
  | label21  = Fuel
  | label21  = Fuel
  |  data21  = {{#invoke:Data|getEngineFuel|Example/engine}}
  |  data21  = {{#invoke:Data|getEngineFuel|Example/engine}}
Line 63: Line 63:
  | label25  = I<sub>sp</sub>: Vac. (s)
  | label25  = I<sub>sp</sub>: Vac. (s)
  |  data25  = {{#invoke:Data|getData|Example/engine|modules|engine|isp|vac}}
  |  data25  = {{#invoke:Data|getData|Example/engine|modules|engine|isp|vac}}
  }}
  }}|}}
 
| below    = {{#invoke:Data|getData|Example/engine|manufacturer}}
| below    = {{#invoke:Data|getData|Example/engine|manufacturer}}
}}
}}
</noinclude>
</noinclude>

Revision as of 18:07, 27 November 2024

T3-ST "Default"
Example Methalox Engine
Statistics
Mass (t)0.500
SizeSM
Max Temp (K)1000
Impact Tolerance (m/s)10
Engine Info
Mode 2
FuelScript error: The function "getEngineFuel" does not exist.
Thrust: 1 atm. (kN)42.0
Thrust: Vac. (kN)88.0
Isp: 1 atm. (s)223
Isp: Vac. (s)628
[[Category:Infobox templates|Template:Remove first word]] data22 =
Mode 2
FuelScript error: The function "getEngineFuel" does not exist.
Thrust: 1 atm. (kN)42.0
Thrust: Vac. (kN)88.0
Isp: 1 atm. (s)223
Isp: Vac. (s)628
[[Category:Infobox templates|Template:Remove first word]]
Community Conglomerate

[[Category:Infobox templates|Template:Remove first word]]