Difference between revisions of "Template:Specs-Card"
Line 64: | Line 64: | ||
-->{{#while: | -->{{#while: | ||
|{{#if: {{#unit: {{#var: me }} | класс | {{#var: i }} }} | true }} | |{{#if: {{#unit: {{#var: me }} | класс | {{#var: i }} }} | true }} | ||
− | | | + | |{{#switch: {{#unit: {{#var: me }} | класс | {{#var: i }} | код }} |
− | + | | type_missile_tank = <div>[[:Category:ATGM vehicles|ATGM vehicle]][[Category:ATGM vehicles]]</div> | |
− | | type_missile_tank = [[:Category:ATGM vehicles|ATGM vehicle]][[Category:ATGM vehicles]] | + | | type_spaa = <div>[[:Category:Anti-aircraft vehicles|SPAA]][[Category:Anti-aircraft vehicles]]</div> |
− | | type_spaa = [[:Category:Anti-aircraft vehicles|SPAA]][[Category:Anti-aircraft vehicles]] | + | | type_tank_destroyer = <div>[[:Category:Tank destroyers|Tank destroyer]][[Category:Tank destroyers]]</div> |
− | | type_tank_destroyer = [[:Category:Tank destroyers|Tank destroyer]][[Category:Tank destroyers]] | + | | type_medium_tank = <div>[[:Category:Medium tanks|Medium tank]][[Category:Medium tanks]]</div> |
− | | type_medium_tank = [[:Category:Medium tanks|Medium tank]][[Category:Medium tanks]] | + | | type_light_tank = <div>[[:Category:Light tanks|Light tank]][[Category:Light tanks]]</div> |
− | | type_light_tank = [[:Category:Light tanks|Light tank]][[Category:Light tanks]] | + | | type_heavy_tank = <div>[[:Category:Heavy tanks|Heavy tank]][[Category:Heavy tanks]]</div> |
− | | type_heavy_tank = [[:Category:Heavy tanks|Heavy tank]][[Category:Heavy tanks]] | + | | type_aa_fighter = <div>[[:Category:Air Defence fighters|Air Defence fighter]][[Category:Air Defence fighters]]</div> |
− | | type_aa_fighter = [[:Category:Air Defence fighters|Air Defence fighter]][[Category:Air Defence fighters]] | + | | type_bomber = <div>[[:Category:Bombers|Bomber]][[Category:Bombers]]</div> |
− | | type_bomber = [[:Category:Bombers|Bomber]][[Category:Bombers]] | + | | type_frontline_bomber = <div>[[:Category:Frontline bombers|Frontline bomber]][[Category:Frontline bombers]]</div> |
− | | type_frontline_bomber = [[:Category:Frontline bombers|Frontline bomber]][[Category:Frontline bombers]] | + | | type_medium_bomber = <div>[[:Category:Medium bombers|Medium bomber]][[Category:Medium bombers]]</div> |
− | | type_medium_bomber = [[:Category:Medium bombers|Medium bomber]][[Category:Medium bombers]] | + | | type_fighter = <div>[[:Category:Fighters|Fighter]][[Category:Fighters]]</div> |
− | | type_fighter = [[:Category:Fighters|Fighter]][[Category:Fighters]] | + | | type_naval_fighter = <div>[[:Category:Naval fighters|Naval fighter]][[Category:Naval fighters]]</div> |
− | | type_naval_fighter = [[:Category:Naval fighters|Naval fighter]][[Category:Naval fighters]] | + | | type_light_fighter = <div>[[:Category:Light fighters|Light fighter]][[Category:Light fighters]]</div> |
− | | type_light_fighter = [[:Category:Light fighters|Light fighter]][[Category:Light fighters]] | + | | type_interceptor = <div>[[:Category:Interceptors|Interceptor]][[Category:Interceptors]]</div> |
− | | type_interceptor = [[:Category:Interceptors|Interceptor]][[Category:Interceptors]] | + | | type_heavy_fighter = <div>[[:Category:Twin-engine fighters|Twin-engine fighter]][[Category:Twin-engine fighters]]</div> |
− | | type_heavy_fighter = [[:Category:Twin-engine fighters|Twin-engine fighter]][[Category:Twin-engine fighters]] | + | | type_strike_fighter = <div>[[:Category:Strike fighters|Strike fighter]][[Category:Strike fighters]]</div> |
− | | type_strike_fighter = [[:Category:Strike fighters|Strike fighter]][[Category:Strike fighters]] | + | | type_torpedo = <div>[[:Category:Torpedo bombers|Torpedo bomber]][[Category:Torpedo bombers]]</div> |
− | | type_torpedo = [[:Category:Torpedo bombers|Torpedo bomber]][[Category:Torpedo bombers]] | + | | type_assault = <div>[[:Category:Attackers|Attacker]][[Category:Attackers]]</div> |
− | | type_assault = [[:Category:Attackers|Attacker]][[Category:Attackers]] | + | | type_naval_aircraft = <div>[[:Category:Naval aircrafts|Naval aircraft]][[Category:Naval aircrafts]]</div> |
− | | | + | | type_biplane = <div>[[:Category:Biplanes|Biplane]][[Category:Biplanes]]</div> |
− | | | + | | type_jet_fighter = <div>[[:Category:Jet fighters|Jet fighter]][[Category:Jet fighters]]</div> |
− | | | + | | type_heavy_bomber = <div>[[:Category:Heavy bombers|Heavy bomber]][[Category:Heavy bombers]]</div> |
− | | | + | | type_longrange_bomber = <div>[[:Category:Long Range bombers|Long Range bomber]][[Category:Long Range bombers]]</div> |
− | | | + | | type_dive_bomber = <div>[[:Category:Dive bombers|Dive bomber]][[Category:Dive bombers]]</div> |
− | | | + | | type_naval_bomber = <div>[[:Category:Naval bombers|Naval bomber]][[Category:Naval bombers]]</div> |
− | | | + | | type_light_bomber = <div>[[:Category:Light bombers|Light bomber]][[Category:Light bombers]]</div> |
− | | | + | | type_jet_bomber = <div>[[:Category:Jet bombers|Jet bomber]][[Category:Jet bombers]]</div> |
− | | | + | | type_hydroplane = <div>[[:Category:Hydroplanes|Hydroplane]][[Category:Hydroplanes]]</div> |
− | | | + | | type_flying_boat = <div>[[:Category:Flying boats|Flying boat]][[Category:Flying boats]]</div> |
− | + | | type_attack_helicopter = <div>[[:Category:Attack helicopters|Attack helicopter]][[Category:Attack helicopters]]</div> | |
− | + | | type_boat = <div>[[:Category:Boats|Boat]][[Category:Boats]]</div> | |
− | + | | type_missile_boat = <div>[[:Category:Fast attack crafts|Fast attack craft]][[Category:Fast attack crafts]]</div> | |
− | + | | type_heavy_boat = <div>[[:Category:Heavy boats|Heavy boat]][[Category:Heavy boats]]</div> | |
− | + | | type_gun_boat = <div>[[:Category:Motor gun boats|Motor gun boat]][[Category:Motor gun boats]]</div> | |
− | + | | type_torpedo_boat = <div>[[:Category:Motor torpedo boats|Motor torpedo boat]][[Category:Motor torpedo boats]]</div> | |
− | + | | type_small_submarine_chaser = <div>[[:Category:Small sub-chasers|Small sub-chaser]][[Category:Small sub-chasers]]</div> | |
− | + | | type_submarine_chaser = <div>[[:Category:Sub-chasers|Sub-chaser]][[Category:Sub-chasers]]</div> | |
− | + | | type_armored_submarine_chaser = <div>[[:Category:Armored sub-chasers|Armored sub-chaser]][[Category:Armored sub-chasers]]</div> | |
− | + | | type_armored_boat = <div>[[:Category:Armored gun boats|Armored gun boat]][[Category:Armored gun boats]]</div> | |
− | + | | type_hydrofoil_torpedo_boat = <div>[[:Category:Hydrofoil torpedo boats|Hydrofoil torpedo boat]][[Category:Hydrofoil torpedo boats]]</div> | |
− | + | | type_destroyer = <div>[[:Category:Destroyers|Destroyer]][[Category:Destroyers]]</div> | |
− | + | | type_light_cruiser = <div>[[:Category:Light cruisers|Light cruiser]][[Category:Light cruisers]]</div> | |
− | + | | type_heavy_cruiser = <div>[[:Category:Heavy cruisers|Heavy cruiser]][[Category:Heavy cruisers]]</div> | |
− | + | | type_barge = <div>[[:Category:Barges|Barge]][[Category:Barges]]</div> | |
− | + | | type_naval_aa_ferry = <div>[[:Category:Anti-air ferrys|Anti-air ferry]][[Category:Anti-air ferrys]]</div> | |
− | + | | type_naval_ferry_barge = <div>[[:Category:Naval ferry barges|Naval ferry barge]][[Category:Naval ferry barges]]</div> | |
− | + | | type_minesweeper = <div>[[:Category:Minesweepers|Minesweeper]][[Category:Minesweepers]]</div> | |
− | + | | type_minelayer = <div>[[:Category:Minelayers|Minelayer]][[Category:Minelayers]]</div> | |
− | + | | type_frigate = <div>[[:Category:Frigates|Frigate]][[Category:Frigates]]</div> | |
− | + | | type_torpedo_gun_boat = <div>[[:Category:Motor torpedo gun boats|Motor torpedo gun boat]][[Category:Motor torpedo gun boats]]</div> | |
− | + | | type_heavy_gun_boat = <div>[[:Category:Gunboats|Gunboat]][[Category:Gunboats]]</div> | |
− | | | + | | type_utility_helicopter = <div>[[:Category:Utility helicopters|Utility helicopter]][[Category:Utility helicopters]]</div> |
− | + | }}{{#vardefine: i | {{#expr: {{#var: i }} + 1 }} }}<!-- | |
-->}}</span><span class="ttx-name">Class</span></div><!-- | -->}}</span><span class="ttx-name">Class</span></div><!-- | ||
--><div class="ttx-table-line"><span class="ttx-value">{{#unit: {{#var: me }} | экипаж | количество }} {{#ifexpr: {{#unit: {{#var: me }} | экипаж | количество }} = 1 | person | people }}</span><span class="ttx-name">Crew</span></div><!-- | --><div class="ttx-table-line"><span class="ttx-value">{{#unit: {{#var: me }} | экипаж | количество }} {{#ifexpr: {{#unit: {{#var: me }} | экипаж | количество }} = 1 | person | people }}</span><span class="ttx-name">Crew</span></div><!-- | ||
Line 155: | Line 155: | ||
-->{{#ifeq:{{#unit: {{#var: me }} | ремонт | рб | макс | значение }} | 0 | -->{{#ifeq:{{#unit: {{#var: me }} | ремонт | рб | макс | значение }} | 0 | ||
|<span class="ttx-value">free</span> | |<span class="ttx-value">free</span> | ||
− | + | |<span class="ttx-value">{{Sl}}</span><span class="ttx-sb ttx-value">{{#ifexpr: ( {{#unit: {{#var: me }} | ремонт | сб | мин | значение }} != {{#unit: {{#var: me }} | ремонт | сб | макс | значение }} ) |{{Annotation|{{#unit: {{#var: me }} | ремонт | сб | мин }} / {{#unit: {{#var: me }} | ремонт | сб | макс }}|minimum / maximum}}|{{#unit: {{#var: me }} | ремонт | сб | макс }}}}</span><span class="ttx-unvisible ttx-value">/</span><!-- | |
--><span class="ttx-rb ttx-value">{{#ifexpr:( {{#unit: {{#var: me }} | ремонт | рб | мин | значение }} != {{#unit: {{#var: me }} | ремонт | рб | макс | значение }} )|{{Annotation|{{#unit: {{#var: me }} | ремонт | рб | мин }} / {{#unit: {{#var: me }} | ремонт | рб | макс }}|minimum / maximum}}|{{#unit: {{#var: me }} | ремонт | рб | макс }}}}</span><span class="ttx-unvisible ttx-value">/</span><!-- | --><span class="ttx-rb ttx-value">{{#ifexpr:( {{#unit: {{#var: me }} | ремонт | рб | мин | значение }} != {{#unit: {{#var: me }} | ремонт | рб | макс | значение }} )|{{Annotation|{{#unit: {{#var: me }} | ремонт | рб | мин }} / {{#unit: {{#var: me }} | ремонт | рб | макс }}|minimum / maximum}}|{{#unit: {{#var: me }} | ремонт | рб | макс }}}}</span><span class="ttx-unvisible ttx-value">/</span><!-- | ||
--><span class="ttx-ab ttx-value">{{#ifexpr:( {{#unit: {{#var: me }} | ремонт | аб | мин | значение }} != {{#unit: {{#var: me }} | ремонт | аб | макс | значение }} )|{{Annotation|{{#unit: {{#var: me }} | ремонт | аб | мин }} / {{#unit: {{#var: me }} | ремонт | аб | макс }}|minimum / maximum}}|{{#unit: {{#var: me }} | ремонт | аб | макс }}}}</span><!-- | --><span class="ttx-ab ttx-value">{{#ifexpr:( {{#unit: {{#var: me }} | ремонт | аб | мин | значение }} != {{#unit: {{#var: me }} | ремонт | аб | макс | значение }} )|{{Annotation|{{#unit: {{#var: me }} | ремонт | аб | мин }} / {{#unit: {{#var: me }} | ремонт | аб | макс }}|minimum / maximum}}|{{#unit: {{#var: me }} | ремонт | аб | макс }}}}</span><!-- |
Revision as of 07:37, 20 March 2020
Description
This template is used to create specification cards for vehicles. This template is required for Template:Specs to function properly.
Usage
{{Specs-Card |code= |images= |store= |market= |cockpit= |title_name= |card_name= }}
Parameters
- code - the code of the desired vehicle (required).
- images - the images to display on the spec card. Template:Specs-Card-Image should be used here.
- store - the store code of the vehicle (optional).
- market - the name of the vehicle on Gaijin Marketplace (optional).
- cockpit - the name of the 3D cockpit image uploaded to the wiki (optional).
- title_name - Changes the display title of the page and adds page to Category:Changed visible name (optional).
- card_name - Changes the name displayed on the stat card and adds page to Category:Changed name in the card (optional).