Difference between revisions of "Template:Habitats"

From RimWorld Wiki
Jump to navigation Jump to search
(For your consideration. Significantly lighter, and only needs 1 new line per new biome (if more are ever added). Feel free to revert.)
Line 5: Line 5:
  
 
You can also make it produce "or" rather than "and" by doing<code><nowiki>{{Habitats|Timber wolf|or}}:</nowiki></code>{{Habitats|Timber wolf|or}}.
 
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><includeonly>
+
</noinclude><includeonly>{{#vardefine: habitatString | {{#if:{{Q|{{{1|{{PAGENAME}}}}}|Lives In Temperate Forest}}|[[temperate forest]]s,&#32;}}<!--
{{#vardefine: habitatString | {{#if:{{Q|{{{1|{{PAGENAME}}}}}|Lives In Temperate Forest}}|[[temperate forest]]s,&#32;}}<!--
 
 
-->{{#if:{{Q|{{{1|{{PAGENAME}}}}}|Lives In Temperate Swamp}}|[[temperate swamp]]s,&#32;}}<!--
 
-->{{#if:{{Q|{{{1|{{PAGENAME}}}}}|Lives In Temperate Swamp}}|[[temperate swamp]]s,&#32;}}<!--
 
-->{{#if:{{Q|{{{1|{{PAGENAME}}}}}|Lives In Tropical Rainforest}}|[[tropical rainforest]]s,&#32;}}<!--
 
-->{{#if:{{Q|{{{1|{{PAGENAME}}}}}|Lives In Tropical Rainforest}}|[[tropical rainforest]]s,&#32;}}<!--

Revision as of 09:07, 22 October 2021

Returns a nicely-formatted list of all the biomes an animal can appear in.

For example, if used on Timber wolf, the result is: temperate forests, temperate swamps, boreal forests, cold bogs, and tundra.

You can also make it produce "or" rather than "and" by doing{{Habitats|Timber wolf|or}}:temperate forests, temperate swamps, boreal forests, cold bogs, or tundra.