Template:InfoBoxVehicle: Difference between revisions
Template page
More actions
m Fixed mistake on type templatedata |
Sqwishyish (talk | contribs) m Added functionality to automatically remove stall speed and service ceiling stats for boats and ground vehicles |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
{| class="infobox" style="width: 22em; border: 0.5px solid grey; border-radius: 0 0 8px 8px; border-collapse: separate; border-spacing: 0; background-clip: padding-box; font-size: 75%; line-height: 1.4em; float: right; clear: right; margin: 0 0 1em 1em; letter-spacing: 0.02em;" | |||
|+ style="font-size: 160%; font-weight: bolder; text-align: center; padding: 1em; border: 0.5px solid grey; border-bottom: 0px; border-radius: 16px 16px 0 0; {{#switch: {{{Rarity|}}} | Mythical = background-color: #19D9FF; color: white; | Legendary = background-color: #d82121; color: white; | Widespread = background-color: #f5f5f5; color: black; | Common = background-color: #99ff99; color: black; | Uncommon = background-color: #ffff66; color: black; | Rare = background-color: #e0a6ff; color: white; | Ultra Rare = background-color: #66a3ff; color: white; | Epic = background-color: #ffbb33; color: black; | #default = }}" | {{{name}}} | |||
|- | |||
| colspan="2" style="text-align: center; background-color: #1b1b1b; padding: 0.5em;" | [[File:{{{photo|{{PAGENAME}}photo.png}}}|300px]] | |||
|- | |||
| colspan="2" style="text-align: center; background-color: #18191c; color: white; font-style: italic; font-size: 85%; padding: 0.4em; border-bottom: 0.4px solid black;" | {{{caption}}} | |||
|- | |||
| colspan="2" style="text-align: center; background-color: #18191c; color: white; font-weight: bold; padding: 0.4em; border-top: 0.5px solid grey; border-bottom: 0.5px solid grey; line-height: 23px;" | {{{General Information|General Information}}} | |||
|- | |||
! style="background-color: #18191c; color: white; text-align: center; width: 31%; padding: 0.4em; border-right: 0.4px solid black;" | Code | |||
| style="background-color: #101317; color: white; padding: 0.6em;" | {{{Code}}} | |||
|- | |||
! style="background-color: #18191c; color: white; text-align: center; padding: 0.4em; border-right: 0.4px solid black;" | Type | |||
| style="background-color: #0c0e12; color: white; padding: 0.6em;" | {{{Type}}} | |||
|- | |||
! style="background-color: #18191c; color: white; text-align: center; padding: 0.4em; border-right: 0.4px solid black;" | Distributor | |||
| style="background-color: #101317; color: white; padding: 0.6em;" | {{{Distributor}}} | |||
|- | |||
! style="background-color: #18191c; color: white; text-align: center; padding: 0.4em; border-right: 0.4px solid black;" | Rarity | |||
| style= "{{#switch: {{{Rarity|}}} | Mythical = background-color: #19D9FF; color: white; | Legendary = background-color: #d82121; color: white; | Widespread = background-color: #f5f5f5; color: black; | Common = background-color: #99ff99; color: black; | Uncommon = background-color: #ffff66; color: black; | Rare = background-color: #e0a6ff; color: white; | Ultra Rare = background-color: #66a3ff; color: white; | Epic = background-color: #ffbb33; color: black; | #default = }}; border-radius: 25px; border: 15px solid #0c0e12;padding: 0.43em; text-align: center; border-collapse: seperate;" | {{{Rarity}}} | |||
|- | |||
! style="background-color: #18191c; color: white; text-align: center; padding: 0.4em; border-right: 0.4px solid black;" | Cost | |||
| style="background-color: #101317; color: white; padding: 0.6em;" | {{#iferror: {{#expr: {{{Cost}}} + 0 }} | {{{Cost}}} | '''{{formatnum:{{{Cost}}}}} WP''' }} | |||
|- | |||
! style="background-color: #18191c; color: white; text-align: center; padding: 0.4em; border-right: 0.4px solid black;" | Jobs | |||
| style="background-color: #0c0e12; color: white; padding: 0.6em;" | {{{Jobs}}} | |||
|- | |||
! style="background-color: #18191c; color: white; text-align: center; padding: 0.4em;" | Customization | |||
| style="background-color: #101317; color: white;padding: 0.6em 0.4em 0.6em 0.4em;" | {{{Customization}}} | |||
|- | |||
| colspan="2" style="text-align: center; background-color: #1b1b1b; color: white; font-weight: bold; padding: 0.4em; border-top: 0.5px solid grey; border-bottom: 0.5px solid grey; line-height: 23px;" | {{{Specifications|Specifications}}} | |||
|- | |||
! style="background-color: #18191c; color: white; text-align: center; padding: 0.4em;" | Max Speed | |||
| style="background-color: #101317; color: white; padding: 0.6em;" | '''{{formatnum:{{{Max Speed}}}}}''' knots / '''{{formatnum:{{#expr: {{{Max Speed}}} * 1.852 round 0}}}}''' kph | |||
{{#ifeq: {{{Type|}}} | Boat || {{#ifeq: {{{Type|}}} | Ground Vehicle || | |||
{{#if: {{{Stall Speed|}}} | |||
| <tr> | |||
<th style="background-color: #18191c; color: white; text-align: center; padding: 0.4em;">Stall Speed</th> | |||
<td style="background-color: #101317; color: white; padding: 0.6em;">'''{{formatnum:{{{Stall Speed}}}}}''' knots / '''{{formatnum:{{#expr: {{{Stall Speed}}} * 1.852 round 0}}}}''' kph</td> | |||
</tr> | |||
}} | |||
{{#if: {{{CeilingFeet|}}} | |||
| <tr> | |||
<th style="background-color: #18191c; color: white; text-align: center; padding: 0.4em;">Ceiling</th> | |||
<td style="background-color: #101317; color: white; padding: 0.6em;">'''{{formatnum:{{{CeilingFeet}}}}}''' ft / '''{{formatnum:{{#expr: {{{CeilingFeet}}} * 0.3048 round 0}}}}''' m</td> | |||
</tr> | |||
}} | |||
}}}} | |||
|- | |||
! style="background-color: #18191c; color: white; text-align: center; padding: 0.4em;" | Range | |||
| style="background-color: #0c0e12; color: white; padding: 0.6em;" | '''{{formatnum:{{{RangeNM}}}}}''' nmi / '''{{formatnum:{{#expr: {{{RangeNM}}} * 1.852 round 0}}}}''' km | |||
|- | |||
! style="background-color: #18191c; color: white; text-align: center; padding: 0.4em; border-right: 0.4px solid black; border-bottom-left-radius: 8px;" | Capacity | |||
| style="background-color: #0c0e12; color: white; padding: 0.6em; border-bottom-right-radius: 8px;" | '''{{formatnum:{{{Capacity}}}}}''' | |||
|} | |||
</includeonly> | |||
{{#ifeq:{{{Rarity|}}}|Widespread|[[Category:Widespread Vehicles]]}} | |||
{{#ifeq:{{{Rarity|}}}|Common|[[Category:Common Vehicles]]}} | |||
{{#ifeq:{{{Rarity|}}}|Uncommon|[[Category:Uncommon Vehicles]]}} | |||
{{#ifeq:{{{Rarity|}}}|Rare|[[Category:Rare Vehicles]]}} | |||
{{#ifeq:{{{Rarity|}}}|Ultra Rare|[[Category:Ultra Rare Vehicles]]}} | |||
{{#ifeq:{{{Rarity|}}}|Epic|[[Category:Epic Vehicles]]}} | |||
{{#ifeq:{{{Rarity|}}}|Mythical|[[Category:Mythical Vehicles]]}} | |||
{{#ifeq:{{{Rarity|}}}|Legendary|[[Category:Legendary Vehicles]]}} | |||
{{#ifeq:{{{Type|}}}|Ultralight|[[Category:Ultralights]]}} | |||
{{#ifeq:{{{Type|}}}|Single Engine|[[Category:Single Engines]]}} | |||
{{#ifeq:{{{Type|}}}|Helicopter|[[Category:Helicopters]]}} | |||
{{#ifeq:{{{Type|}}}|Multi Engine|[[Category:Multi Engines]]}} | |||
{{#ifeq:{{{Type|}}}|Jet Engine|[[Category:Jet Engines]]}} | |||
{{#ifeq:{{{Type|}}}|Supersonic Transport|[[Category:Supersonic Transports]]}} | |||
{{#ifeq:{{{Type|}}}|VTOL|[[Category:VTOLs]]}} | |||
{{#ifeq:{{{Type|}}}|Airship|[[Category:Airships]]}} | |||
{{#ifeq:{{{Type|}}}|Boat|[[Category:Boats]]}} | |||
{{#ifeq:{{{Type|}}}|Ground Vehicle|[[Category:Ground Vehicles]]}} | |||
<templatedata> | <noinclude> | ||
<!-- Example example values --> | |||
{{Template:Testinfobox | |||
| name = Boeing 737-800 | |||
| caption = Boeing 737-800 flying low over the [[Thalassan Sea]] | |||
| Rarity = Common | |||
| Code = 737-800 | |||
| Type = Jet Engine | |||
| Distributor = [[Clarence International Airport]] | |||
| Cost = 19300 | |||
| Jobs = [[Passenger]], [[Charter]] | |||
| Max Speed = 453 | |||
| Stall Speed = 120 | |||
| CeilingFeet = 41010 | |||
| RangeNM = 144 | |||
| Capacity = 36 | |||
| Customization = {{Checkbox (colored)|checked|color=blue}} [[Advanced Liveries]] <br> {{Checkbox (colored)|checked|color=blue}} [[Advanced Customisation]] <br>{{Checkbox (colored)|checked|color=blue}} [[Cockpit]] | |||
| photo = Aerowikiplaceholder.jpg | |||
}} | |||
<templatedata> | |||
{ | |||
"description": "Vehicle InfoBox Template(currently in testing state)", | |||
"params": { | |||
"name": { | |||
"label": "Name", | |||
"description": "The name of the vehicle, this should be the same as the name of the page.", | |||
"type": "string", | |||
"example": "Boeing 737-800", | |||
"suggested": true | |||
}, | |||
"caption": { | |||
"label": "Image caption", | |||
"description": "A brief description of the image shown in the InfoBox.", | |||
"type": "string", | |||
"example": "Boeing 737-800 flying low over the [[Thalassan Sea]]", | |||
"suggested": true | |||
}, | |||
"Rarity": { | |||
"label": "Rarity", | |||
"description": "The ingame rarity of the vehicle.", | |||
"type": "string", | |||
"suggestedvalues": [ | |||
"Widespread", | |||
"Common", | |||
"Uncommon", | |||
"Rare", | |||
"Ultra Rare", | |||
"Epic", | |||
"Mythical", | |||
"Legendary" | |||
], | |||
"example": "Common", | |||
"suggested": true | |||
}, | |||
"Code": { | |||
"label": "Code", | |||
"description": "The ingame code of the vehicle.", | |||
"type": "string", | |||
"example": "737-800", | |||
"suggested": true | |||
}, | |||
"Type": { | |||
"label": "Type", | |||
"description": "The license required to operate this aircraft", | |||
"type": "string", | |||
"suggestedvalues": [ | |||
"Ultralight", | |||
"Single Engine", | |||
"Helicopter", | |||
"Multi Engine", | |||
"Jet Engine", | |||
"Supersonic Transport", | |||
"VTOL", | |||
"Airship", | |||
"Boat", | |||
"Ground Vehicle" | |||
], | |||
"example": "Jet Engine", | |||
"suggested": true | |||
}, | |||
"photo": { | |||
"label": "Image", | |||
"description": "Image shown at the top of the InfoBox.", | |||
"example": "Aerowikiplaceholder.jpg", | |||
"type": "wiki-file-name", | |||
"autovalue": "Aerowikiplaceholder.jpg", | |||
"suggested": true | |||
}, | |||
"Distributor": { | |||
"type": "string", | |||
"label": "Distributor", | |||
"description": "Location the vehicle can obtained.", | |||
"example": "[[Clarence International Airport]]", | |||
"suggested": true | |||
}, | |||
"Cost": { | |||
"aliases": [ | |||
"Price" | |||
], | |||
"label": "Cost", | |||
"description": "Cost of the vehicle in Wingz Points (units are automatically appended), or the method of obtaining the vehicle. ", | |||
"example": "19300", | |||
"type": "string", | |||
"suggested": true | |||
}, | |||
"Jobs": { | |||
"label": "Available jobs", | |||
"description": "A list of the available jobs the vehicle has. Items are to be page links and separated by commas. ", | |||
"example": "[[Passenger]], [[Charter]]", | |||
"type": "string", | |||
"suggested": true | |||
}, | |||
"Customization": { | |||
"label": "Vehicle customization options", | |||
"description": "(Work in progress)", | |||
"type": "string" | |||
}, | |||
"Max Speed": { | |||
"label": "Maximum speed", | |||
"description": "The maximum speed of the vehicle in knots (units are automatically appended).", | |||
"example": "453", | |||
"type": "number", | |||
"suggested": true | |||
}, | |||
"Stall Speed": { | |||
"label": "Stall speed", | |||
"description": "The stall speed of the vehicle in knots (units are automatically appended).", | |||
"example": "120", | |||
"type": "number", | |||
"suggested": true | |||
}, | |||
"CeilingFeet": { | |||
"label": "Service ceiling", | |||
"description": "The service ceiling of the vehicle in feet (units are automatically appended).", | |||
"example": "41010", | |||
"type": "number", | |||
"suggested": true | |||
}, | |||
"RangeNM": { | |||
"label": "Range", | |||
"description": "The range of the vehicle in nautical miles (units are automatically appended).", | |||
"example": "144", | |||
"type": "number", | |||
"suggested": true | |||
}, | }, | ||
"paramOrder": [ | "Capacity": { | ||
"label": "Capacity", | |||
"description": "The capacity of the vehicle.", | |||
"example": "36", | |||
"type": "number", | |||
"suggested": true | |||
} | |||
}, | |||
"paramOrder": [ | |||
"name", | |||
"Code", | |||
"Type", | |||
"Distributor", | |||
"Rarity", | |||
"Cost", | |||
"Jobs", | |||
"Customization", | |||
"Max Speed", | |||
"Stall Speed", | |||
"CeilingFeet", | |||
"RangeNM", | |||
"Capacity", | |||
"photo", | |||
"caption" | |||
] | |||
} | } | ||
</templatedata> | |||
</noinclude> |