Difference between revisions of "Template:Habitats/doc"

From RimWorld Wiki
Jump to navigation Jump to search
(Created page with "Returns a nicely-formatted list of all the biomes an animal can appear in. For example, if used on Timber wolf, the result is: {{Habitats|Timber wolf}}. You can also mak...")
 
 
Line 1: Line 1:
Returns a nicely-formatted list of all the biomes an animal can appear in.
+
Returns a nicely-formatted list of all the [[biomes]] an [[animal]] or [[plant]] can appear in as defined by the "Lives in" properties.
  
For example, if used on [[Timber wolf]], the result is: {{Habitats|Timber wolf}}.
+
== Parameters ==
 +
All parameters are optional.
 +
 
 +
The first parameter defines the animal or plant of which to display the native biomes. If no value is set, it defaults to the current page.
 +
 
 +
The second, if present, changes the word between the last two habitats from "and" to "or". Any text will work, but "or" is suggested for clarity's sake.
 +
 
 +
== Examples ==
 +
<code><nowiki>{{Habitats}}</nowiki></code>
 +
 
 +
If used on [[Timber wolf]], would result in: {{Habitats|Timber wolf}}.
 +
 
 +
<code><nowiki>{{Habitats|Bamboo tree}}</nowiki></code>
 +
 
 +
If used on any page, would result in: {{Habitats|Bamboo tree}}.
 +
 
 +
<code><nowiki>{{Habitats|Cobra|or}}</nowiki></code>
 +
 
 +
If used on any page, would result in: {{Habitats|Cobra|or}}.
 +
 
 +
<code><nowiki>Wild healroot can spawn in a number of biomes including {{Habitats|Wild healroot}}.</nowiki></code>
 +
 
 +
If used on any page, would result in: Wild healroot can spawn in a number of biomes including {{Habitats|Wild healroot}}.
  
You can also make it produce "or" rather than "and" by doing<code><nowiki>{{Habitats|Timber wolf|or}}:</nowiki></code>{{Habitats|Timber wolf|or}}.
 
 
<noinclude>[[Category: Template documentation]]</noinclude>
 
<noinclude>[[Category: Template documentation]]</noinclude>
<includeonly>[[Category: Template]]</includeonly>
+
<includeonly>[[Category: Templates]]</includeonly>

Latest revision as of 11:26, 29 September 2022

Returns a nicely-formatted list of all the biomes an animal or plant can appear in as defined by the "Lives in" properties.

Parameters[edit]

All parameters are optional.

The first parameter defines the animal or plant of which to display the native biomes. If no value is set, it defaults to the current page.

The second, if present, changes the word between the last two habitats from "and" to "or". Any text will work, but "or" is suggested for clarity's sake.

Examples[edit]

{{Habitats}}

If used on Timber wolf, would result in: temperate forests, temperate swamps, boreal forests, cold bogs, and tundra.

{{Habitats|Bamboo tree}}

If used on any page, would result in: tropical rainforests.

{{Habitats|Cobra|or}}

If used on any page, would result in: tropical rainforests, or tropical swamps.

Wild healroot can spawn in a number of biomes including {{Habitats|Wild healroot}}.

If used on any page, would result in: Wild healroot can spawn in a number of biomes including temperate forests, temperate swamps, boreal forests, cold bogs, and tundra.