Difference between revisions of "Template:Infobox main"

From RimWorld Wiki
Jump to navigation Jump to search
(added support for exotic items (colored yellow))
m (better color)
Line 14: Line 14:
 
   | stony = c_12
 
   | stony = c_12
 
   | food = c_08
 
   | food = c_08
   | exotic = c_02}}
+
   | exotic = c_11}}
 
}}">
 
}}">
 
<p class="heading">{{#var:Name}}</p>
 
<p class="heading">{{#var:Name}}</p>
Line 1,162: Line 1,162:
 
{{#if:{{{destroyyield|}}}|
 
{{#if:{{{destroyyield|}}}|
 
;{{H:title|link=no|Resources recovered when destroyed.|Destroy yield}}
 
;{{H:title|link=no|Resources recovered when destroyed.|Destroy yield}}
:{{{destroyyield|}}}<!--Uses destroyyield if it's set. leavesresourceswhendestroyed and bonusdestroyleavings are to be phased out.
+
:{{{destroyyield|}}}<!--Uses destroyyield if it's set. leavesresourceswhendestroyed and bonusdestroyleavings are to be phased o
-->|{{#ifeq:{{{type|}}}|Building|<!--If leavesresourceswhendestroyed != false and resource 1 != None or if bonusdestroyleavings != None: write the title
 
-->{{#ifexpr: {{#ifeq:{{lc:{{{leavesresourceswhendestroyed|}}}}}|false|0|1}}*{{#if:{{{resource 1|}}}|1|0}} + {{#if:{{{bonusdestroyleavings|}}}|1|0}} > 0|
 
;{{H:title|link=no|Resources recovered when destroyed.|Destroy yield}}
 
:{{#ifexpr: {{#ifeq:{{lc:{{{leavesresourceswhendestroyed|}}}}}|false|0|1}}*{{#if:{{{resource 1|}}}|1|0}} = 1|<!--If leavesresourceswhendestroyed != false and resource 1 != None: list out resources*0.25
 
-->{{#if: {{{resource 1|}}}| {{Icon Small|{{{resource 1|}}}|16}} {{#ifeq: {{#expr: ceil({{{resource 1 amount|}}}*0.25) }} | {{#expr: floor({{{resource 1 amount|}}}*0.25) }}|{{#expr: {{{resource 1 amount|}}}*0.25 }}|{{#expr: floor({{{resource 1 amount|}}}*0.25) }} - {{#expr: ceil({{{resource 1 amount|}}}*0.25) }} }}|}} <!--
 
-->{{#if: {{{resource 2|}}}| + {{Icon Small|{{{resource 2|}}}|16}} {{#ifeq: {{#expr: ceil({{{resource 2 amount|}}}*0.25) }} | {{#expr: floor({{{resource 2 amount|}}}*0.25) }}|{{#expr: {{{resource 2 amount|}}}*0.25 }}|{{#expr: floor({{{resource 2 amount|}}}*0.25) }} - {{#expr: ceil({{{resource 2 amount|}}}*0.25) }} }}|}} <!--
 
-->{{#if: {{{resource 3|}}}| + {{Icon Small|{{{resource 3|}}}|16}} {{#ifeq: {{#expr: ceil({{{resource 3 amount|}}}*0.25) }} | {{#expr: floor({{{resource 3 amount|}}}*0.25) }}|{{#expr: {{{resource 3 amount|}}}*0.25 }}|{{#expr: floor({{{resource 3 amount|}}}*0.25) }} - {{#expr: ceil({{{resource 3 amount|}}}*0.25) }} }}|}} <!--
 
-->{{#if: {{{resource 4|}}}| + {{Icon Small|{{{resource 4|}}}|16}} {{#ifeq: {{#expr: ceil({{{resource 4 amount|}}}*0.25) }} | {{#expr: floor({{{resource 4 amount|}}}*0.25) }}|{{#expr: {{{resource 4 amount|}}}*0.25 }}|{{#expr: floor({{{resource 4 amount|}}}*0.25) }} - {{#expr: ceil({{{resource 4 amount|}}}*0.25) }} }}|}} <!--
 
-->{{#if: {{{resource 5|}}}| + {{Icon Small|{{{resource 5|}}}|16}} {{#ifeq: {{#expr: ceil({{{resource 5 amount|}}}*0.25) }} | {{#expr: floor({{{resource 5 amount|}}}*0.25) }}|{{#expr: {{{resource 5 amount|}}}*0.25 }}|{{#expr: floor({{{resource 5 amount|}}}*0.25) }} - {{#expr: ceil({{{resource 5 amount|}}}*0.25) }} }}|}} <!--
 
-->{{#if: {{{resource 6|}}}| + {{Icon Small|{{{resource 6|}}}|16}} {{#ifeq: {{#expr: ceil({{{resource 6 amount|}}}*0.25) }} | {{#expr: floor({{{resource 6 amount|}}}*0.25) }}|{{#expr: {{{resource 6 amount|}}}*0.25 }}|{{#expr: floor({{{resource 6 amount|}}}*0.25) }} - {{#expr: ceil({{{resource 6 amount|}}}*0.25) }} }}|}}<!--
 
-->|}}<!--
 
-->{{#ifexpr:{{#ifeq:{{lc:{{{leavesresourceswhendestroyed|}}}}}|false|0|1}}*{{#if:{{{resource 1|}}}|1|0}}*{{#if:{{{bonusdestroyleavings|}}}|1|0}} = 1| + }}<!--If leavesresourceswhendestroyed != false and resource 1 != None and bonusdestroyleavings != None: write " + "
 
-->{{#if:{{{bonusdestroyleavings|}}}|{{{bonusdestroyleavings|}}}}}<!--If bonusdestroyleavings != None, write bonusdestroyleavings (should be given in format: <amount> {{Icon small|<resource>}})
 
-->|}}<!--
 
-->|}}<!--
 
-->}}
 
 
 
<!-- TECHNICAL -->
 
{{#if: {{{page verified for version|}}}|{{Verified|{{{page verified for version|}}}}}| {{Verified}} }}
 
 
 
{{#if: {{{defName|}}} {{{thingCategories|}}} {{{file|}}} {{{weaponTags|}}} {{{thingSetMakerTags|}}} {{{defaultOutfitTags|}}} {{{factionPrerequisiteTags|}}} {{{harvestTag|}}} {{{recipePrerequisiteTags|}}} {{{ResearchProjectTagDef|}}} {{{sowTag|}}} {{{sowTags|}}} {{{tag|}}} {{{tags|}}} {{{techHediffsTags|}}} {{{thingSetMakerTagsToAllow|}}} {{{thingSetMakerTagsToDisallow|}}} {{{tradeTag|}}} {{{tradeTags|}}} {{{tradeTagsBuy|}}} {{{tradeTagsSell|}}} {{{tradeTagsToAllow|}}} {{{tutorHighlightTag|}}} {{{apparelTags|}}} {{{buildingTags|}}} {{{stuff adjective|}}} {{{small volume|}}} {{{preferability|}}} {{{food preference|}}} {{{drug category|}}} {{{is pleasure drug|}}} {{{work efficiency factor|}}} {{{work efficiency offset|}}} {{{max simultaneous facilities|}}} {{{unpowered work speed factor|}}}|
 
</dl>{{clear}}
 
<div class="subheading mw-customtoggle-myDivision" style='height: 1.75em !important; padding: 0.25em 0em 0.25em !important; margin: 0.5em 0 0.5em !important; width:300px'> '''Technical'''
 
<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-myDivision"> <span style='color: #504f54; text-align: left; text-shadow: 0px 0px; font-family: Arial; font-size: 0.8em; height: 0em !important; padding: 0em 0em 0em !important; margin: 0em 0 0em !important;'>
 
{{#if: {{{defName|}}}|
 
; defName
 
: {{{defName|}}}
 
}}<!--
 
-->{{#if: {{{file|}}}|
 
; File
 
: {{{file|}}}
 
}}<!--
 
-->{{#if: {{{thingCategories|}}}|
 
; thingCategories
 
: {{{thingCategories|}}}
 
}}<!--
 
-->{{#if: {{{weaponTags|}}}|{{#set:
 
weaponTags = {{ucfirst:{{#explode:{{{weaponTags|}}}|,|0}} }}
 
|weaponTags = {{ucfirst:{{#explode:{{{weaponTags|}}}|,|1}} }}
 
|weaponTags = {{ucfirst:{{#explode:{{{weaponTags|}}}|,|2}} }}
 
|weaponTags = {{ucfirst:{{#explode:{{{weaponTags|}}}|,|3}} }}
 
|weaponTags = {{ucfirst:{{#explode:{{{weaponTags|}}}|,|4}} }}
 
}}
 
; weaponTags
 
: {{{weaponTags|}}}
 
}}<!--
 
-->{{#if: {{{thingSetMakerTags|}}}|
 
; thingSetMakerTags
 
: {{{thingSetMakerTags|}}}
 
}}<!--
 
-->{{#if: {{{defaultOutfitTags|}}} |
 
; defaultOutfitTags
 
: {{{defaultOutfitTags|}}}
 
}}<!--
 
-->{{#if: {{{factionPrerequisiteTags|}}} |
 
; factionPrerequisiteTags
 
: {{{factionPrerequisiteTags|}}}
 
}}<!--
 
-->{{#if: {{{harvestTag|}}} |
 
; harvestTag
 
: {{{harvestTag|}}}
 
}}<!--
 
-->{{#if: {{{recipePrerequisiteTags|}}} |
 
;recipePrerequisiteTags
 
: {{{recipePrerequisiteTags|}}}
 
}}<!--
 
-->{{#if: {{{ResearchProjectTagDef|}}} |
 
;ResearchProjectTagDef
 
:{{{ResearchProjectTagDef|}}}
 
}}<!--
 
-->{{#if: {{{sowTag|}}} |{{#set: sowTag = {{{sowTag|}}}}}
 
;sowTag
 
:{{{sowTag|}}}
 
}}<!--
 
-->{{#if: {{{sowTags|}}} |{{#set: sowTags = {{{sowTags|}}}}}
 
;sowTags
 
:{{{sowTags|}}}
 
}}<!--
 
-->{{#if: {{{tag|}}} |{{#set:
 
tag = {{ucfirst:{{#explode:{{{tag|}}}|,|0}} }}
 
|tag = {{ucfirst:{{#explode:{{{tag|}}}|,|1}} }}
 
|tag = {{ucfirst:{{#explode:{{{tag|}}}|,|2}} }}
 
|tag = {{ucfirst:{{#explode:{{{tag|}}}|,|3}} }}
 
|tag = {{ucfirst:{{#explode:{{{tag|}}}|,|4}} }}
 
}}
 
;tag
 
:{{{tag|}}}
 
}}<!--
 
-->{{#if: {{{tags|}}} |{{#set:
 
tags = {{ucfirst:{{#explode:{{{tags|}}}|,|0}} }}
 
|tags = {{ucfirst:{{#explode:{{{tags|}}}|,|1}} }}
 
|tags = {{ucfirst:{{#explode:{{{tags|}}}|,|2}} }}
 
|tags = {{ucfirst:{{#explode:{{{tags|}}}|,|3}} }}
 
|tags = {{ucfirst:{{#explode:{{{tags|}}}|,|4}} }}
 
}}
 
;tags
 
:{{{tags|}}}
 
}}<!--
 
-->{{#if: {{{techHediffsTags|}}} | {{#set:
 
techHediffsTags = {{ucfirst:{{#explode:{{{techHediffsTags|}}}|,|0}} }}
 
|techHediffsTags = {{ucfirst:{{#explode:{{{techHediffsTags|}}}|,|1}} }}
 
|techHediffsTags = {{ucfirst:{{#explode:{{{techHediffsTags|}}}|,|2}} }}
 
|techHediffsTags = {{ucfirst:{{#explode:{{{techHediffsTags|}}}|,|3}} }}
 
|techHediffsTags = {{ucfirst:{{#explode:{{{techHediffsTags|}}}|,|4}} }}
 
}}
 
;techHediffsTags
 
:{{{techHediffsTags|}}}
 
}}<!--
 
-->{{#if: {{{thingSetMakerTagsToAllow|}}} |
 
;thingSetMakerTagsToAllow
 
:{{{thingSetMakerTagsToAllow|}}}
 
}}<!--
 
-->{{#if: {{{thingSetMakerTagsToDisallow|}}} |
 
;thingSetMakerTagsToDisallow
 
:{{{thingSetMakerTagsToDisallow|}}}
 
}}<!--
 
-->{{#if: {{{tradeTag|}}} |{{#set: tradeTag = {{{tradeTag|}}}}}
 
;tradeTag
 
:{{{tradeTag|}}}
 
}}<!--
 
-->{{#if: {{{tradeTags|}}} |{{#set: tradeTags = {{{tradeTags|}}}}}
 
;tradeTags
 
:{{{tradeTags|}}}
 
}}<!--
 
-->{{#if: {{{tradeTagsBuy|}}} |
 
;tradeTagsBuy
 
:{{{tradeTagsBuy|}}}
 
}}<!--
 
-->{{#if: {{{tradeTagsSell|}}} |
 
;tradeTagsSell
 
:{{{tradeTagsSell|}}}
 
}}<!--
 
-->{{#if: {{{tradeTagsToAllow|}}} |
 
;tradeTagsToAllow
 
:{{{tradeTagsToAllow|}}}
 
}}<!--
 
-->{{#if: {{{tutorHighlightTag|}}} |
 
;tutorHighlightTag
 
:{{{tutorHighlightTag|}}}
 
}}<!--
 
-->{{#if: {{{apparelTags|}}} |{{#set:
 
apparelTags = {{ucfirst:{{#explode:{{{apparelTags|}}}|,|0}} }}
 
|apparelTags = {{ucfirst:{{#explode:{{{apparelTags|}}}|,|1}} }}
 
|apparelTags = {{ucfirst:{{#explode:{{{apparelTags|}}}|,|2}} }}
 
|apparelTags = {{ucfirst:{{#explode:{{{apparelTags|}}}|,|3}} }}
 
|apparelTags = {{ucfirst:{{#explode:{{{apparelTags|}}}|,|4}} }}
 
}}
 
;apparelTags
 
:{{{apparelTags|}}}
 
}}<!--
 
-->{{#if: {{{buildingTags|}}} |{{#set:
 
buildingTags = {{ucfirst:{{#explode:{{{buildingTags|}}}|,|0}} }}
 
|buildingTags = {{ucfirst:{{#explode:{{{buildingTags|}}}|,|1}} }}
 
|buildingTags = {{ucfirst:{{#explode:{{{buildingTags|}}}|,|2}} }}
 
|buildingTags = {{ucfirst:{{#explode:{{{buildingTags|}}}|,|3}} }}
 
|buildingTags = {{ucfirst:{{#explode:{{{buildingTags|}}}|,|4}} }}
 
}}
 
;buildingTags
 
:{{{buildingTags|}}}
 
}}<!--
 
-->{{#if: {{{stuff adjective|}}}|{{#set: Stuff Adjective = {{{stuff adjective|}}}}}
 
; Stuff Adjective
 
:{{{stuff adjective|}}}
 
}}<!--
 
-->{{#if: {{{small volume|}}}|{{#set: Small Volume = {{{small volume|}}}}}
 
; Small Volume
 
:{{{small volume|}}}
 
}}<!--
 
-->{{#if: {{{preferability|}}}|{{#set: Preferability = {{{preferability|}}}}}
 
; Preferability
 
: {{{preferability|}}}}}<!--
 
-->{{#if: {{{food preference|}}}|{{#set: Food Preference = {{{food preference|}}}}}
 
; Food Preference
 
: {{{food preference|}}}<!--
 
-->{{#if: {{{drug category|}}}|{{#set: Drug Category = {{{drug category|}}}}}
 
; Drug Category
 
: {{{drug category|}}}}}<!--
 
-->{{#if: {{{is pleasure drug|}}}|{{#set: Is Pleasure Drug = {{{is pleasure drug|}}}}}
 
; Is Pleasure Drug
 
: {{{is pleasure drug|}}}}}}}<!--
 
--></span> </div> </div>}}
 
<br style="clear: both; height: 0px;" />
 
</div></div></includeonly><noinclude>
 
{{documentation}}</noinclude><!-- Add categories and interwikis to the /doc subpage, not here! -->
 

Revision as of 16:17, 18 April 2022