Template:ShipInfobox: Difference between revisions

m Hopefully fixed link to image
Converted to Lua's InfoBoxBuilder
Line 1: Line 1:
<onlyinclude>{| class="eInfobox eWikiColor" style="width: 300px;"
<onlyinclude>
|-
{{#infoboxbuilder:
! colspan=2 style="text-align: center; font-size: 1.2em;" | {{PAGENAME}}
| 0:Theme = eInfobox
|-
 
! colspan=2 style="text-align: center; padding: 1px;" | {{#if:{{{image|}}}|[[File:{{{image}}}|292px]]|[[File:Placeholder.png|292px]]}}
| 1:Type  = Title
|- {{#if:{{{factionreq|}}}||style="display: none;"}}
| 1:Value = {{PAGENAME}}
! colspan=2 style="text-align: center; color: #FFFF66;" | Requires {{{factionreq|}}} rank of {{{factionrank|}}} or higher
 
|-
| 2:Type  = MainImage
! style="width: 120px;" | Manufacturer
| 2:Value = {{#if:{{{image|}}}|[[File:{{{image}}}|292px]]|[[File:Placeholder.png|292px]]}}
| {{#if:{{{manufacturer|}}}|[[{{{manufacturer|}}}]]|---}}
 
|-
{{#if:{{{factionreq|}}}||
! style="width: 120px;" | Cost
| 3:Type  = Header
| {{#if:{{{cost|}}}|{{{cost|?}}} CR|---}}
| 3:Value = Requires {{{factionreq|}}} rank of {{{factionrank|}}} or higher
|- {{#if:{{{cost|}}}||style="display: none;"}}
}}
! style="width: 120px;" | Insurance
 
| {{formatnum:{{#expr:trunc({{formatnum:{{{cost|}}}|R}}*0.05)}}}} CR
| 4:Type = Line
|-
| 4:Label = Manufacturer
! style="width: 120px;" | Top Speed
| 4:Value = {{#if:{{{manufacturer|}}}|[[{{{manufacturer|}}}]]|---}}
| {{#if:{{{topspeed|}}}|{{{topspeed|?}}} m/s|---}}
 
|-
| 5:Type = Line
! style="width: 120px;" | Boost Speed
| 5:Label = Cost
| {{#if:{{{boostspeed|}}}|{{{boostspeed|?}}} m/s|---}}
| 5:Value = {{#if:{{{cost|}}}|{{{cost|?}}} CR|---}}
|-
 
! style="width: 120px;" | Manoeuvrability
{{#if:{{{cost|}}}||
| {{#if:{{{manoeuvrability|}}}|{{{manoeuvrability|}}}|---}}
| 6:Type = Line
|-
| 6:Label = Insurance
! style="width: 120px;" | Shields
| 6:Value = {{formatnum:{{#expr:trunc({{formatnum:{{{cost|}}}|R}}*0.05)}}}} CR
| {{#if:{{{shields|}}}|{{{shields|?}}}|---}}
}}
|-
 
! style="width: 120px;" | Armour
| 7:Type = Line
| {{#if:{{{armour|}}}|{{{armour|?}}}|---}}
| 7:Label = Top Speed
|-
| 7:Value = {{#if:{{{topspeed|}}}|{{{topspeed|?}}} m/s|---}}
! style="width: 120px;" | Hull Mass
 
| {{#if:{{{hullmass|}}}|{{{hullmass|?}}} T|---}}
| 8:Type = Line
|- {{#if:{{{cargocapacity|}}}||style="display: none;"}}
| 8:Label = Boost Speed
! style="width: 120px;" | Cargo Capacity
| 8:Value = {{#if:{{{boostspeed|}}}|{{{boostspeed|?}}} m/s|---}}
| {{#if:{{{cargocapacity|}}}|{{{cargocapacity|?}}} T|---}}
 
|- {{#if:{{{fuelcapacity|}}}||style="display: none;"}}
| 9:Type = Line
! style="width: 120px;" | Fuel Capacity
| 9:Label = Manoeuvrability
| {{#if:{{{fuelcapacity|}}}|{{{fuelcapacity|?}}} T|---}}
| 9:Value = {{#if:{{{manoeuvrability|}}}|{{{manoeuvrability|}}}|---}}
|- {{#if:{{{jumprange|x}}}||style="display: none;"}}
 
! style="width: 120px;" | Unladen Jump Range
| 10:Type = Line
| {{{jumprange|}}} LY
| 10:Label = Shields
|-
| 10:Value = {{#if:{{{shields|}}}|{{{shields|?}}}|---}}
! style="width: 120px;" | Landing Pad Size
 
| {{#if:{{{landingpad|}}}|{{{landingpad|?}}}|---}}
| 11:Type = Line
|-
| 11:Label = Armour
! style="width: 120px;" | Hardpoints
| 11:Value = {{#if:{{{armour|}}}|{{{armour|?}}}|---}}
| {{#if:{{{utility|}}}|{{{utility}}}x Utility Mount{{#ifexpr:{{{utility|}}}>1|s}}}}{{#if:{{{small|}}}|{{#if:{{{utility|}}}|<br>}}{{{small|}}}x Small Hardpoint{{#ifexpr:{{{small|}}}>1|s}}}}{{#if:{{{medium|}}}|{{#if:{{{utility|}}}or{{{small|}}}|<br>}}{{{medium|}}}x Medium Hardpoint{{#ifexpr:{{{medium|}}}>1|s}}}}{{#if:{{{large|}}}|{{#if:{{{utility|}}}or{{{small|}}}or{{{medium|}}}|<br>}}{{{large|}}}x Large Hardpoint{{#ifexpr:{{{large|}}}>1|s}}}}{{#if:{{{huge|}}}|{{#if:{{{utility|}}}or{{{small|}}}or{{{medium|}}}or{{{large|}}}|<br>}}{{{huge|}}}x Huge Hardpoint{{#ifexpr:{{{huge|}}}>1|s}}}}
 
|-
| 12:Type = Line
! style="width: 120px;" | Internals
| 12:Label = Hull Mass
| {{#if:{{{size1|}}}|{{{size1|}}}x Size 1 Compartment{{#ifexpr:{{{size1|}}}>1|s}}}}{{#if:{{{size2|}}}|{{#if:{{{size1|}}}|<br>}}{{{size2|}}}x Size 2 Compartment{{#ifexpr:{{{size2|}}}>1|s}}}}{{#if:{{{size3|}}}|{{#if:{{{size1|}}}or{{{size2|}}}|<br>}}{{{size3|}}}x Size 3 Compartment{{#ifexpr:{{{size3|}}}>1|s}}}}{{#if:{{{size4|}}}|{{#if:{{{size1|}}}or{{{size2|}}}or{{{size3|}}}|<br>}}{{{size4|}}}x Size 4 Compartment{{#ifexpr:{{{size4|}}}>1|s}}}}{{#if:{{{size5|}}}|{{#if:{{{size1|}}}or{{{size2|}}}or{{{size3|}}}or{{{size4|}}}|<br>}}{{{size5|}}}x Size 5 Compartment{{#ifexpr:{{{size5|}}}>1|s}}}}{{#if:{{{size6|}}}|{{#if:{{{size1|}}}or{{{size2|}}}or{{{size3|}}}or{{{size4|}}}or{{{size5|}}}|<br>}}{{{size6|}}}x Size 6 Compartment{{#ifexpr:{{{size6|}}}>1|s}}}}{{#if:{{{size7|}}}|{{#if:{{{size1|}}}or{{{size2|}}}or{{{size3|}}}or{{{size4|}}}or{{{size5|}}}or{{{size6|}}}|<br>}}{{{size7|}}}x Size 7 Compartment{{#ifexpr:{{{size7|}}}>1|s}}}}{{#if:{{{size8|}}}|{{#if:{{{size1|}}}or{{{size2|}}}or{{{size3|}}}or{{{size4|}}}or{{{size5|}}}or{{{size6|}}}or{{{size7|}}}|<br>}}{{{size8|}}}x Size 8 Compartment{{#ifexpr:{{{size8|}}}>1|s}}}}{{#if:{{{reservedic|}}}|{{#if:{{{size1|}}}or{{{size2|}}}or{{{size3|}}}or{{{size4|}}}or{{{size5|}}}or{{{size6|}}}or{{{size7|}}}or{{{size8|}}}|<br>}}{{{reservedic|}}}}}
| 12:Value = {{#if:{{{hullmass|}}}|{{{hullmass|?}}} T|---}}
|- <!-- {{#if:{{{modules|}}}||style="display: none;"}}
 
! style="width: 120px;" | Modules
{{#if:{{{cargocapacity|}}}||
| {{{modules|}}}
| 13:Type = Line
|- -->
| 13:Label = Cargo Capacity
| colspan=2 style="font-size: 0.9em;" | *Information represents the default version of the ship.
| 13:Value = {{#if:{{{cargocapacity|}}}|{{{cargocapacity|?}}} T|---}}
|}<includeonly>
}}
 
{{#if:{{{fuelcapacity|}}}||
| 14:Type = Line
| 14:Label = Fuel Capacity
| 14:Value = {{#if:{{{fuelcapacity|}}}|{{{fuelcapacity|?}}} T|---}}
}}
 
 
{{#if:{{{jumprange|x}}}||
| 15:Type = Line
| 15:Label = Unladen Jump Range
| 15:Value = {{{jumprange|}}} LY
}}
 
| 16:Type = Line
| 16:Label = Landing Pad Size
| 16:Value = {{#if:{{{landingpad|}}}|{{{landingpad|?}}}|---}}
 
| 17:Type = Line
| 17:Label = Hardpoints
| 17:Value = {{#if:{{{utility|}}}|{{{utility}}}x Utility Mount{{#ifexpr:{{{utility|}}}>1|s}}}}{{#if:{{{small|}}}|{{#if:{{{utility|}}}|<br>}}{{{small|}}}x Small Hardpoint{{#ifexpr:{{{small|}}}>1|s}}}}{{#if:{{{medium|}}}|{{#if:{{{utility|}}}or{{{small|}}}|<br>}}{{{medium|}}}x Medium Hardpoint{{#ifexpr:{{{medium|}}}>1|s}}}}{{#if:{{{large|}}}|{{#if:{{{utility|}}}or{{{small|}}}or{{{medium|}}}|<br>}}{{{large|}}}x Large Hardpoint{{#ifexpr:{{{large|}}}>1|s}}}}{{#if:{{{huge|}}}|{{#if:{{{utility|}}}or{{{small|}}}or{{{medium|}}}or{{{large|}}}|<br>}}{{{huge|}}}x Huge Hardpoint{{#ifexpr:{{{huge|}}}>1|s}}}}
 
| 18:Type = Line
| 18:Label = Internals
| 18:Value = {{#if:{{{size1|}}}|{{{size1|}}}x Size 1 Compartment{{#ifexpr:{{{size1|}}}>1|s}}}}{{#if:{{{size2|}}}|{{#if:{{{size1|}}}|<br>}}{{{size2|}}}x Size 2 Compartment{{#ifexpr:{{{size2|}}}>1|s}}}}{{#if:{{{size3|}}}|{{#if:{{{size1|}}}or{{{size2|}}}|<br>}}{{{size3|}}}x Size 3 Compartment{{#ifexpr:{{{size3|}}}>1|s}}}}{{#if:{{{size4|}}}|{{#if:{{{size1|}}}or{{{size2|}}}or{{{size3|}}}|<br>}}{{{size4|}}}x Size 4 Compartment{{#ifexpr:{{{size4|}}}>1|s}}}}{{#if:{{{size5|}}}|{{#if:{{{size1|}}}or{{{size2|}}}or{{{size3|}}}or{{{size4|}}}|<br>}}{{{size5|}}}x Size 5 Compartment{{#ifexpr:{{{size5|}}}>1|s}}}}{{#if:{{{size6|}}}|{{#if:{{{size1|}}}or{{{size2|}}}or{{{size3|}}}or{{{size4|}}}or{{{size5|}}}|<br>}}{{{size6|}}}x Size 6 Compartment{{#ifexpr:{{{size6|}}}>1|s}}}}{{#if:{{{size7|}}}|{{#if:{{{size1|}}}or{{{size2|}}}or{{{size3|}}}or{{{size4|}}}or{{{size5|}}}or{{{size6|}}}|<br>}}{{{size7|}}}x Size 7 Compartment{{#ifexpr:{{{size7|}}}>1|s}}}}{{#if:{{{size8|}}}|{{#if:{{{size1|}}}or{{{size2|}}}or{{{size3|}}}or{{{size4|}}}or{{{size5|}}}or{{{size6|}}}or{{{size7|}}}|<br>}}{{{size8|}}}x Size 8 Compartment{{#ifexpr:{{{size8|}}}>1|s}}}}{{#if:{{{reservedic|}}}|{{#if:{{{size1|}}}or{{{size2|}}}or{{{size3|}}}or{{{size4|}}}or{{{size5|}}}or{{{size6|}}}or{{{size7|}}}or{{{size8|}}}|<br>}}{{{reservedic|}}}}}
 
| 19:Type = Footer
| 19:Value = *Information represents the default version of the ship.
}}<includeonly>
[[Category:Ships]]
[[Category:Ships]]
</includeonly></onlyinclude>
</includeonly></onlyinclude>