Difference between revisions of "Template:Place data"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Created page with "<includeonly>{{#switch: {{{1}}} |KSC={{#switch: {{{2}}} |body=Kerbin |image=TinyKSC.png |#default={{{3|}}} }} |#default={{{3|}}}}}</includeonly><noinclude>A collection of data...")
 
(+expanded to support biomes;)
Line 1: Line 1:
 
<includeonly>{{#switch: {{{1}}}
 
<includeonly>{{#switch: {{{1}}}
|KSC={{#switch: {{{2}}}
+
|KSC|Kerbal Space Center={{#switch: {{{2}}}
 
|body=Kerbin
 
|body=Kerbin
 
|image=TinyKSC.png
 
|image=TinyKSC.png
 +
|name
 +
|page=Kerbal Space Center
 
|#default={{{3|}}}
 
|#default={{{3|}}}
 
}}
 
}}
|#default={{{3|}}}}}</includeonly><noinclude>A collection of data for the various places, similar to the idea of {{Tl|BodyData}}.
+
|B/Badlands|B/Desert|B/Grasslands|B/Highlands|B/Ice Caps|B/KSC|B/Launch Pad|B/Mountain|B/Runway|B/Shores|B/Tundra|B/Water={{#switch: {{{2}}}
 
+
|body=Kerbin
Because currently there is only one place, KSC, it's everything in this template. In future version this might work exactly like BodyData.
+
|image=KerbinBiomeMap.png
 +
|name={{#explode:{{{1}}}|/|2}}
 +
|page=
 +
|#default={{{3|}}}
 +
}}
 +
}}
 +
|#default={{{3|}}}}}</includeonly><noinclude>A collection of data for the various places, similar to the idea of {{Tl|Body data}}. In future version this might work exactly like <nowiki>{{Body data}}</nowiki>.
  
 
== Parameters ==
 
== Parameters ==
Line 17: Line 25:
  
 
== Places ==
 
== Places ==
As described in the introduction, the only name allowed is ''KSC''.
+
{| class="wikitable"
 +
! Code
 +
! Body
 +
! Name
 +
! Page
 +
! Description
 +
|-
 +
| KSC
 +
| rowspan="2" | [[Kerbin]]
 +
| rowspan="2" | Kerbal Space Center
 +
| rowspan="2" | [[Kerbal Space Center]]
 +
| rowspan="2" | The Kerbal Space Center
 +
|-
 +
| Kerbal Space Center
 +
|-
 +
| B/Badlands
 +
| Badlands
 +
| rowspan="12" | —
 +
| rowspan="12" | [[Kerbin]]
 +
| rowspan="12" | Biomes on Kerbin
 +
|-
 +
| B/Desert
 +
| Desert
 +
|-
 +
| B/Grasslands
 +
| Grasslands
 +
|-
 +
| B/Highlands
 +
| Highlands
 +
|-
 +
| B/Ice Caps
 +
| Ice Caps
 +
|-
 +
| B/KSC
 +
| KSC
 +
|-
 +
| B/Launch Pad
 +
| Launch Pad
 +
|-
 +
| B/Mountain
 +
| Mountain
 +
|-
 +
| B/Runway
 +
| Runway
 +
|-
 +
| B/Shores
 +
| Shores
 +
|-
 +
| B/Tundra
 +
| Tundra
 +
|-
 +
| B/Water
 +
| Water
 +
|-
 +
|}
  
 
== Properties ==
 
== Properties ==
Line 29: Line 91:
 
| <tt>image</tt>
 
| <tt>image</tt>
 
| The image of that place without ''File:'' prefix.
 
| The image of that place without ''File:'' prefix.
 +
|-
 +
| <tt>name</tt>
 +
| The name of the place
 +
|-
 +
| <tt>page</tt>
 +
| The page of the place. Returns an empty string if there is no page.
 +
|-
 
|}
 
|}
  
 
[[Category:Metatemplates]]</noinclude>
 
[[Category:Metatemplates]]</noinclude>

Revision as of 13:45, 2 August 2014

A collection of data for the various places, similar to the idea of {{Body data}}. In future version this might work exactly like {{Body data}}.

Parameters

# Optional Description Default
1 No The requested place's name.
2 No The requested place's property.
3 No The default value, if there is no such property or place.

Places

Code Body Name Page Description
KSC Kerbin Kerbal Space Center Kerbal Space Center The Kerbal Space Center
Kerbal Space Center
B/Badlands Badlands Kerbin Biomes on Kerbin
B/Desert Desert
B/Grasslands Grasslands
B/Highlands Highlands
B/Ice Caps Ice Caps
B/KSC KSC
B/Launch Pad Launch Pad
B/Mountain Mountain
B/Runway Runway
B/Shores Shores
B/Tundra Tundra
B/Water Water

Properties

Name Description
body The body this place is on.
image The image of that place without File: prefix.
name The name of the place
page The page of the place. Returns an empty string if there is no page.