Template:Consumables: Difference between revisions

From PZwiki
(Moved the working sandbox version over to the production version.)
m (Automated Formatting)
(24 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<includeonly>
<noinclude>
<!-- Table to use if the item is both perishable and cooked-->
{{Documentation/sandbox|doc=
{{#ifexpr:{{{perishable|0}}}<>0| {{#ifexpr:{{{cookable|0}}}<>0|
The {{tll|Consumables}} (previously called {{Code|'''Consumables2'''}}) template is used to add a table to a food item's page. If a property is not included or is 0, it will not be displayed.
<TABLE class="mw-collapsible wikitable" style="text-align: center; margin-left:auto; margin-right:auto; vertical-align:text-top;">
 
  <TR>
==Parameters==
    <TH colspan="4">Nutritional Information</TH>
===Table===
  </TR>
*position [left{{!}}center{{!}}right]
  <TR>
 
    <TH>Uncooked</TH>
===Images===
    <TD style="vertical-align:top">'''Fresh {{#ifeq:{{{name|x}}}|x|{{PAGENAME}}|{{{name}}} }}'''<BR />{{#if: {{{image|}}} | [[Image:{{{image}}}]] }} <BR /><small>{{#ifexpr:{{{hunger|0}}}<>0|'''Hunger:''' {{{hunger}}}<BR />|}}{{#ifexpr:{{{thirst|0}}}<>0|'''Thirst:''' {{{thirst}}}<BR />|}}{{#ifexpr:{{{boredom|0}}}<>0|'''Boredom Change:''' {{{boredom}}}<BR />|}}{{#ifexpr:{{{stress|0}}}<>0|'''Stress Change:''' {{{stress}}}<BR />|}}{{#ifexpr:{{{unhappiness|0}}}<>0|'''Unhappiness Change:''' {{{unhappiness}}}|}}</small></TD>
*image [required]
    <TD style="vertical-align:top">'''{{#ifeq:{{{name|x}}}|x|{{PAGENAME}}|{{{name}}} }}'''<BR />{{#if: {{{image|}}} | [[Image:{{{image}}}]] | (No Image)}}<BR /><SMALL>{{#ifexpr:{{{unrotten hunger|0}}}<>0|'''Hunger:''' {{{unrotten hunger}}}<BR />|}}{{#ifexpr:{{{unrotten thirst|0}}}<>0|'''Thirst:''' {{{unrotten thirst}}}<BR />|}}{{#ifexpr:{{{unrotten boredom|0}}}<>0|'''Boredom Change:''' {{{unrotten boredom}}}<BR />|}}{{#ifexpr:{{{unrotten stress|0}}}<>0|'''Stress Change:''' {{{unrotten stress}}}<BR />|}}{{#ifexpr:{{{unrotten unhappiness|0}}}<>0|'''Unhappiness Change:''' {{{unrotten unhappiness}}}<BR />|}}</SMALL></TD>
*burned image
    <TD style="vertical-align:top">'''Rotten {{#ifeq:{{{name|x}}}|x|{{PAGENAME}}|{{{name}}} }}'''<BR />{{#if: {{{rotten image|}}} | [[Image:{{{rotten image}}}]] | (No Image)}}<BR /><small>{{#ifexpr:{{{rotten hunger|0}}}<>0|'''Hunger:''' {{{rotten hunger}}}<BR />|}}{{#ifexpr:{{{rotten thirst|0}}}<>0|'''Thirst:''' {{{rotten thirst}}}<BR />|}}{{#ifexpr:{{{rotten boredom|0}}}<>0|'''Boredom Change:''' {{{rotten boredom}}}<BR />|}}{{#ifexpr:{{{rotten stress|0}}}<>0|'''Stress Change:''' {{{rotten stress}}}<BR />|}}{{#ifexpr:{{{rotten unhappiness|0}}}<>0|'''Unhappiness Change:''' {{{rotten unhappiness}}}<BR /><font style="color:red">Consuming this may make you [[Moodles#Sick|sick]].</font> }}</SMALL></TD>
*rotten image
  </TR>
*cooked image
  <TR>
 
    <TH>Cooked</TH>
===Properties===
    <TD style="vertical-align:top">'''Fresh Cooked {{#ifeq:{{{name|x}}}|x|{{PAGENAME}}|{{{name}}} }}'''<BR />{{#if: {{{cooked image|}}} | [[Image:{{{cooked image}}}]] | (No Image)}}<BR /><small>{{#ifexpr:{{{cooked hunger|0}}}<>0|'''Hunger:''' {{{cooked hunger}}}<BR />|}}{{#ifexpr:{{{cooked thirst|0}}}<>0|'''Thirst:''' {{{cooked thirst}}}<BR />|}}{{#ifexpr:{{{cooked boredom|0}}}<>0|'''Boredom Change:''' {{{cooked boredom}}}<BR />|}}{{#ifexpr:{{{cooked stress|0}}}<>0|'''Stress Change:''' {{{cooked stress}}}<BR />|}}{{#ifexpr:{{{cooked unhappiness|0}}}<>0|'''Unhappiness Change:''' {{{cooked unhappiness}}}<BR />}}</small></TD>
*perishable [true{{!}}false] (use 1 for true, 0 for false)
    <TD style="vertical-align:top">'''Cooked {{#ifeq:{{{name|x}}}|x|{{PAGENAME}}|{{{name}}} }}'''<BR />{{#if: {{{cooked image|}}} | [[Image:{{{cooked image}}}]] | (No Image)}}<BR /><SMALL>{{#ifexpr:{{{unrottencooked hunger|0}}}<>0|'''Hunger:''' {{{unrottencooked hunger}}}<BR />}}{{#ifexpr:{{{unrottencooked thirst|0}}}<>0|'''Thirst:''' {{{unrottencooked thirst}}}<BR />|}}{{#ifexpr:{{{unrottencooked boredom|0}}}<>0|'''Boredom Change:''' {{{unrottencooked boredom}}}<BR />}}{{#ifexpr:{{{unrottencooked stress|0}}}<>0|'''Stress Change:''' {{{unrottencooked stress}}}<BR />|}}{{#ifexpr:{{{unrottencooked unhappiness|0}}}<>0|'''Unhappiness Change:''' {{{unrottencooked unhappiness}}}<BR />}}</SMALL></TD>
*cookable [true{{!}}false] (use 1 for true, 0 for false)
    <TD style="vertical-align:top">'''Rotten Cooked {{#ifeq:{{{name|x}}}|x|{{PAGENAME}}|{{{name}}} }}'''<BR />{{#if: {{{cooked image|}}} | [[Image:{{{cooked image}}}]] | (No Image)}}<BR /><small>{{#ifexpr:{{{rottencooked hunger|0}}}<>0|'''Hunger:''' {{{rottencooked hunger}}}<BR />|}}{{#ifexpr:{{{rottencooked thirst|0}}}<>0|'''Thirst:''' {{{rottencooked thirst}}}<BR />|}}{{#ifexpr:{{{rottencooked boredom|0}}}<>0|'''Boredom Change:''' {{{rottencooked boredom}}}<BR />|}}{{#ifexpr:{{{rottencooked stress|0}}}<>0|'''Stress Change:''' {{{rottencooked stress}}}<BR />|}}{{#ifexpr:{{{rottencooked unhappiness|0}}}<>0|'''Unhappiness Change:''' {{{rottencooked unhappiness}}}<BR /><font style="color:red">Consuming this may make you [[Moodles#Sick|sick]].</font>|}}</SMALL></TD>
 
  </TR>
===Uncooked===
  <TR>
;Fresh:
    <TH>Burned</TH>
*weight
    <TD style="vertical-align:top">'''Burned {{#ifeq:{{{name|x}}}|x|{{PAGENAME}}|{{{name}}} }}'''<BR />{{#if: {{{burned image|}}} | [[Image:{{{burned image}}}]] | (No Image)}}<BR /><small>{{#ifexpr:{{{burned hunger|0}}}<>0|'''Hunger:''' {{{burned hunger}}}<BR />|}}{{#ifexpr:{{{burned thirst|0}}}<>0|'''Thirst:''' {{{burned thirst}}}<BR />|}}{{#ifexpr:{{{burned boredom|0}}}<>0|'''Boredom Change:''' {{{burned boredom}}}<BR />|}}{{#ifexpr:{{{burned stress|0}}}<>0|'''Stress Change:''' {{{burned stress}}}<BR />|}}{{#ifexpr:{{{burned unhappiness|0}}}<>0|'''Unhappiness Change:''' {{{burned unhappiness}}}<BR /><font style="color:red">Consuming this may make you [[Moodles#Sick|sick]].</font>}}</small></TD>
*hunger
  </TR>
*boredom
</TABLE>
*stress
| }} |}}
*unhappiness
<!-- Table to use if the item is only perishable-->
 
{{#ifexpr:{{{perishable|0}}}<>0| {{#ifexpr:{{{cookable|0}}}=0|
;Stale:
<TABLE class="mw-collapsible wikitable" style="text-align: center; margin-left:auto; margin-right:auto; vertical-align:text-top;">
<small>(Unrotten meaning not fresh anymore but not yet rotten</small>
  <TR>
*unrotten hunger
    <TH colspan="4">Nutritional Information</TH>
*unrotten boredom
  </TR>
*unrotten stress
  <TR>
*unrotten unhappiness
    <TD style="vertical-align:top">'''Fresh {{#ifeq:{{{name|x}}}|x|{{PAGENAME}}|{{{name}}} }}'''<BR />{{#if: {{{image|}}} | [[Image:{{{image}}}]] }} <BR /><small>{{#ifexpr:{{{hunger|0}}}<>0|'''Hunger:''' {{{hunger}}}<BR />|}}{{#ifexpr:{{{thirst|0}}}<>0|'''Thirst:''' {{{thirst}}}<BR />|}}{{#ifexpr:{{{boredom|0}}}<>0|'''Boredom Change:''' {{{boredom}}}<BR />|}}{{#ifexpr:{{{stress|0}}}<>0|'''Stress Change:''' {{{stress}}}<BR />|}}{{#ifexpr:{{{unhappiness|0}}}<>0|'''Unhappiness Change:''' {{{unhappiness}}}|}}</small></TD>
 
    <TD style="vertical-align:top">'''{{#ifeq:{{{name|x}}}|x|{{PAGENAME}}|{{{name}}} }}'''<BR />{{#if: {{{image|}}} | [[Image:{{{image}}}]] | (No Image)}}<BR /><SMALL>{{#ifexpr:{{{unrotten hunger|0}}}<>0|'''Hunger:''' {{{unrotten hunger}}}<BR />|}}{{#ifexpr:{{{unrotten thirst|0}}}<>0|'''Thirst:''' {{{unrotten thirst}}}<BR />|}}{{#ifexpr:{{{unrotten boredom|0}}}<>0|'''Boredom Change:''' {{{unrotten boredom}}}<BR />|}}{{#ifexpr:{{{unrotten stress|0}}}<>0|'''Stress Change:''' {{{unrotten stress}}}<BR />|}}{{#ifexpr:{{{unrotten unhappiness|0}}}<>0|'''Unhappiness Change:''' {{{unrotten unhappiness}}}<BR />|}}</SMALL></TD>
;Rotten:
    <TD style="vertical-align:top">'''Rotten {{#ifeq:{{{name|x}}}|x|{{PAGENAME}}|{{{name}}} }}'''<BR />{{#if: {{{rotten image|}}} | [[Image:{{{rotten image}}}]] | (No Image)}}<BR /><small>{{#ifexpr:{{{rotten hunger|0}}}<>0|'''Hunger:''' {{{rotten hunger}}}<BR />|}}{{#ifexpr:{{{rotten thirst|0}}}<>0|'''Thirst:''' {{{rotten thirst}}}<BR />|}}{{#ifexpr:{{{rotten boredom|0}}}<>0|'''Boredom Change:''' {{{rotten boredom}}}<BR />|}}{{#ifexpr:{{{rotten stress|0}}}<>0|'''Stress Change:''' {{{rotten stress}}}<BR />|}}{{#ifexpr:{{{rotten unhappiness|0}}}<>0|'''Unhappiness Change:''' {{{rotten unhappiness}}}<BR /><font style="color:red">Consuming this may make you [[Moodles#Sick|sick]].</font> }}</SMALL></TD>
*rotten hunger
  </TR>
*rotten boredom
</TABLE>
*rotten stress
| }} | }}
*rotten unhappiness
<!-- Table to use if the item only cookable-->
 
{{#ifexpr:{{{cookable|0}}}<>0| {{#ifexpr:{{{perishable|0}}}=0|
===Cooked===
<TABLE class="mw-collapsible wikitable" style="text-align: center; margin-left:auto; margin-right:auto; vertical-align:text-top;">
;Fresh:
  <TR>
*cooked weight
    <TH colspan="4">Nutritional Information</TH>
*cooked hunger
  </TR>
*cooked boredom
  <TR>
*cooked stress
    <TH>Uncooked</TH>
*cooked unhappiness
    <TD style="vertical-align:top">'''{{#ifeq:{{{name|x}}}|x|{{PAGENAME}}|{{{name}}} }}'''<BR />{{#if: {{{image|}}} | [[Image:{{{image}}}]] }} <BR /><small>{{#ifexpr:{{{hunger|0}}}<>0|'''Hunger:''' {{{hunger}}}<BR />|}}{{#ifexpr:{{{thirst|0}}}<>0|'''Thirst:''' {{{thirst}}}<BR />|}}{{#ifexpr:{{{boredom|0}}}<>0|'''Boredom Change:''' {{{boredom}}}<BR />|}}{{#ifexpr:{{{stress|0}}}<>0|'''Stress Change:''' {{{stress}}}<BR />|}}{{#ifexpr:{{{unhappiness|0}}}<>0|'''Unhappiness Change:''' {{{unhappiness}}}|}}</small></TD>
 
  </TR>
;Stale:
  <TR>
*unrottencooked weight
    <TH>Cooked</TH>
*unrottencooked hunger
    <TD style="vertical-align:top">'''Cooked {{#ifeq:{{{name|x}}}|x|{{PAGENAME}}|{{{name}}} }}'''<BR />{{#if: {{{cooked image|}}} | [[Image:{{{cooked image}}}]] | (No Image)}}<BR /><small>{{#ifexpr:{{{cooked hunger|0}}}<>0|'''Hunger:''' {{{cooked hunger}}}<BR />|}}{{#ifexpr:{{{cooked thirst|0}}}<>0|'''Thirst:''' {{{cooked thirst}}}<BR />|}}{{#ifexpr:{{{cooked boredom|0}}}<>0|'''Boredom Change:''' {{{cooked boredom}}}<BR />|}}{{#ifexpr:{{{cooked stress|0}}}<>0|'''Stress Change:''' {{{cooked stress}}}<BR />|}}{{#ifexpr:{{{cooked unhappiness|0}}}<>0|'''Unhappiness Change:''' {{{cooked unhappiness}}}<BR />}}</small></TD>
*unrottencooked boredom
  </TR>
*unrottencooked stress
  <TR>
*unrottencooked unhappiness
    <TH>Burned</TH>
 
    <TD style="vertical-align:top">'''Burned {{#ifeq:{{{name|x}}}|x|{{PAGENAME}}|{{{name}}} }}'''<BR />{{#if: {{{burned image|}}} | [[Image:{{{burned image}}}]] | (No Image)}}<BR /><small>{{#ifexpr:{{{burned hunger|0}}}<>0|'''Hunger:''' {{{burned hunger}}}<BR />|}}{{#ifexpr:{{{burned thirst|0}}}<>0|'''Thirst:''' {{{burned thirst}}}<BR />|}}{{#ifexpr:{{{burned boredom|0}}}<>0|'''Boredom Change:''' {{{burned boredom}}}<BR />|}}{{#ifexpr:{{{burned stress|0}}}<>0|'''Stress Change:''' {{{burned stress}}}<BR />|}}{{#ifexpr:{{{burned unhappiness|0}}}<>0|'''Unhappiness Change:''' {{{burned unhappiness}}}<BR /><font style="color:red">Consuming this may make you [[Moodles#Sick|sick]].</font>}}</small></TD>
;Rotten:
  </TR>
*rottencooked weight
</TABLE>
*rottencooked hunger
| }} | }}
*rottencooked boredom
</includeonly>
*rottencooked stress
*rottencooked unhappiness


<noinclude>
===Burned===
{{documentation}}
;Burned:
[[category:templates]]
*burned hunger
</noinclude>
*burned boredom
*burned unhappiness
 
==Examples==
===Example 1===
;Code
<pre>{{Consumables
|image = Grapes.png
|hunger = -15
|unrotten hunger = -11
|unrotten boredom = +10
|unrotten unhappiness = +10
|unrotten image = Grapes.png
|rotten hunger = -6
|rotten boredom = +20
|rotten unhappiness = +20
|perishable = 1
|rotten image = GrapesRotten.png
}}</pre>
 
;Result
{{Consumables
|image = Grapes.png
|hunger = -15
|unrotten hunger = -11
|unrotten boredom = +10
|unrotten unhappiness = +10
|unrotten image = Grapes.png
|rotten hunger = -6
|rotten boredom = +20
|rotten unhappiness = +20
|perishable = 1
|rotten image = GrapesRotten.png
}}
 
===Example 2===
;Code
<pre>{{Consumables
|position = center
|image = Chicken.png
|rotten image = Chicken Rotten.png
|cooked image = Chicken Cooked.png
|burned image = Chicken Overdone.png
|perishable = 1
|cookable = 1
|hunger = -35
|dangerous uncooked = 1
|boredom = 0
|unhappiness = 0
|unrotten hunger = -26
|unrotten unhappiness = +10
|unrotten boredom = +10
|rotten hunger = -15
|rotten unhappiness = +20
|rotten boredom = +20
|cooked hunger = -45
|cooked unhappiness = 0
|cooked boredom = 0
|unrottencooked hunger = -26
|unrottencooked unhappiness = +10
|unrottencooked boredom = +10
|rottencooked hunger = -15
rottencooked unhappiness = +20
|rottencooked boredom = +20
|burned hunger = -11
|burned boredom = +20
|burned unhappiness = +20
}}</pre>
 
;Result
{{Consumables
|image = Chicken.png
|rotten image = Chicken Rotten.png
|cooked image = Chicken Cooked.png
|burned image = Chicken Overdone.png
|perishable = 1
|cookable = 1
|hunger = -35
|dangerous uncooked = 1
|boredom = 0
|unhappiness = 0
|unrotten hunger = -26
|unrotten unhappiness = +10
|unrotten boredom = +10
|rotten hunger = -15
|rotten unhappiness = +20
|rotten boredom = +20
|cooked hunger = -45
|cooked unhappiness = 0
|cooked boredom = 0
|unrottencooked hunger = -26
|unrottencooked unhappiness = +10
|unrottencooked boredom = +10
|rottencooked hunger = -15
|rottencooked unhappiness = +20
|rottencooked boredom = +20
|burned hunger = -11
|burned boredom = +20
|burned unhappiness = +20
}}
 
==See also==
*{{ll|Template:ConditionChange}}
 
}}
{{ll|Category:Templates}}
</noinclude><includeonly><!--
 
###########################
## PERISHABLE & COOKABLE ##
###########################
 
-->{{#ifexpr:{{{perishable|0}}}<>0| {{#ifexpr:{{{cookable|0}}}<>0|
{{{!}} class="wikitable theme-red" style="text-align:center; vertical-align:text-top; {{#switch: {{{position|}}}|center=margin-left:auto; margin-right:auto;|right=margin-left:auto;|left=margin-right:auto;|}}" cellpadding=5
{{!}}-
! width=32px {{!}}
! width=268px {{!}} Fresh
! width=268px {{!}} Stale
! width=268px {{!}} Rotten
{{!}}-
! <div style="transform:rotate(270deg);">Uncooked</div>
{{!}} <small>
{{#if:{{{image|}}}|[[Image:{{{image}}}]]}}<br>
{{ConditionChange|MoodletName=Hunger|MoodletChange={{{hunger|0}}}}}<br>
{{ConditionChange|MoodletName=Boredom|MoodletChange={{{boredom|0}}}}}<br>
{{ConditionChange|MoodletName=Unhappiness|MoodletChange={{{unhappiness|0}}}}}<br>
{{ConditionChange|DangerousUncooked={{{dangerous uncooked|0}}}}}
</small>
{{!}} style="vertical-align:top;" {{!}} <small>
{{#if:{{{image|}}}|[[Image:{{{image}}}]]}}<br>
{{ConditionChange|MoodletName=Hunger|MoodletChange={{{unrotten hunger|0}}}}}<br>
{{ConditionChange|MoodletName=Boredom|MoodletChange={{{unrotten boredom|0}}}}}<br>
{{ConditionChange|MoodletName=Unhappiness|MoodletChange={{{unrotten unhappiness|0}}}}}<br>
{{ConditionChange|DangerousUncooked={{{dangerous uncooked|0}}}}}
</small>
{{!}} style="vertical-align:top;" {{!}} <small>
{{#if:{{{rotten image|}}}|[[Image:{{{rotten image}}}]]}}</div>
{{ConditionChange|MoodletName=Hunger|MoodletChange={{{rotten hunger|0}}}}}<br>
{{ConditionChange|MoodletName=Boredom|MoodletChange={{{rotten boredom|0}}}}}<br>
{{ConditionChange|MoodletName=Unhappiness|MoodletChange={{{rotten unhappiness|0}}}}}<br>
{{ConditionChange|WillMakeSick=1}}
</small>
{{!}}-
! <div style="transform:rotate(270deg);">Cooked</div>
{{!}} style="vertical-align:top;" {{!}} <small>
{{#if:{{{cooked image|}}}|[[Image:{{{cooked image}}}]]}}<br>
{{ConditionChange|MoodletName=Hunger|MoodletChange={{{cooked hunger|0}}}}}<br>
{{ConditionChange|MoodletName=Boredom|MoodletChange={{{cooked boredom|0}}}}}<br>
{{ConditionChange|MoodletName=Unhappiness|MoodletChange={{{cooked unhappiness|0}}}}}
</small>
{{!}} style="vertical-align:top;" {{!}} <small>
{{#if:{{{cooked image|}}}|[[Image:{{{cooked image}}}]]}}<br>
{{ConditionChange|MoodletName=Hunger|MoodletChange={{{unrottencooked hunger|0}}}}}<br>
{{ConditionChange|MoodletName=Boredom|MoodletChange={{{unrottencooked boredom|0}}}}}<br>
{{ConditionChange|MoodletName=Unhappiness|MoodletChange={{{unrottencooked unhappiness|0}}}}}
</small>
{{!}} style="vertical-align:top;" {{!}} <small>
{{#if:{{{cooked image|}}}|[[Image:{{{cooked image}}}]]}}<br>
{{ConditionChange|MoodletName=Hunger|MoodletChange={{{rottencooked hunger|0}}}}}<br>
{{ConditionChange|MoodletName=Boredom|MoodletChange={{{rottencooked boredom|0}}}}}<br>
{{ConditionChange|MoodletName=Unhappiness|MoodletChange={{{rottencooked unhappiness|0}}}}}<br>
{{ConditionChange|WillMakeSick=1}}
</small>
{{!}}-
! <div style="transform:rotate(270deg);">Burned</div>
{{!}} style="vertical-align:top;" colspan=3 {{!}} <small>
{{#if:{{{burned image|}}}
|[[Image:{{{burned image}}}]]}}<br>
{{ConditionChange|MoodletName=Hunger|MoodletChange={{{burned hunger|0}}}}}<br>
{{ConditionChange|MoodletName=Boredom|MoodletChange={{{burned boredom|0}}}}}<br>
{{ConditionChange|MoodletName=Unhappiness|MoodletChange={{{burned unhappiness|0}}}}}<br>
{{ConditionChange|WillMakeSick=1}}
</small>
{{!}}-
{{!}}}|}}|}}<!--
 
#####################
## PERISHABLE ONLY ##
#####################
 
-->{{#ifexpr:{{{perishable|0}}}<>0| {{#ifexpr:{{{cookable|0}}}=0|
{{{!}} class="wikitable theme-red" style="text-align:center; vertical-align:text-top;{{#switch: {{{position|}}}|center=margin-left:auto; margin-right:auto;|right=margin-left:auto;|left=margin-right:auto;|}}" cellpadding=5
! width=202px {{!}} Fresh
! width=202px {{!}} Stale
! width=202px {{!}} Rotten
{{!}}-
{{!}} style="vertical-align:top;" {{!}} <small>
{{#if:{{{image|}}}|[[Image:{{{image}}}]]}}<br>
{{ConditionChange|MoodletName=Hunger|MoodletChange={{{hunger|0}}}}}<br>
{{ConditionChange|MoodletName=Boredom|MoodletChange={{{boredom|0}}}}}<br>
{{ConditionChange|MoodletName=Unhappiness|MoodletChange={{{unhappiness|0}}}}}<br>
{{ConditionChange|DangerousUncooked={{{dangerous uncooked|0}}}}}
</small>
{{!}} style="vertical-align:top;" {{!}} <small>
{{#if:{{{image|}}}|[[Image:{{{image}}}]]}}<br>
{{ConditionChange|MoodletName=Hunger|MoodletChange={{{unrotten hunger|0}}}}}<br>
{{ConditionChange|MoodletName=Boredom|MoodletChange={{{unrotten boredom|0}}}}}<br>
{{ConditionChange|MoodletName=Unhappiness|MoodletChange={{{unrotten unhappiness|0}}}}}<br>
{{ConditionChange|DangerousUncooked={{{dangerous uncooked|0}}}}}
</small>
{{!}} style="vertical-align:top;" {{!}} <small>
{{#if:{{{rotten image|}}}|[[Image:{{{rotten image}}}]]}}<br>
{{ConditionChange|MoodletName=Hunger|MoodletChange={{{rotten hunger|0}}}}}<br>
{{ConditionChange|MoodletName=Boredom|MoodletChange={{{rotten boredom|0}}}}}<br>
{{ConditionChange|MoodletName=Unhappiness|MoodletChange={{{rotten unhappiness|0}}}}}<br>
{{ConditionChange|WillMakeSick=1}}
</small>
{{!}}}|}}|}}<!--
 
###################
## COOKABLE ONLY ##
###################
 
-->{{#ifexpr:{{{cookable|0}}}<>0| {{#ifexpr:{{{perishable|0}}}=0|
{{{!}} class="wikitable theme-red" style="text-align: center; vertical-align:text-top; {{#switch: {{{position|}}}|center=margin-left:auto; margin-right:auto;|right=margin-left:auto;|left=margin-right:auto;|}}" cellpadding=5
! width=268px {{!}} Uncooked
! width=268px {{!}} Cooked
! width=268px {{!}} Burned
{{!}}-
{{!}} style="vertical-align:top;" {{!}} <small>
{{#if:{{{image|}}}|[[Image:{{{image}}}]]}}<br>
{{ConditionChange|MoodletName=Hunger|MoodletChange={{{hunger|0}}}}}<br>
{{ConditionChange|MoodletName=Boredom|MoodletChange={{{boredom|0}}}}}<br>
{{ConditionChange|MoodletName=Unhappiness|MoodletChange={{{unhappiness|0}}}}}<br>
{{ConditionChange|DangerousUncooked={{{dangerous uncooked|0}}}}}
</small>
{{!}} style="vertical-align:top;" {{!}} <small>
{{#if:{{{cooked image|}}}|[[Image:{{{cooked image}}}]]}}<br>
{{ConditionChange|MoodletName=Hunger|MoodletChange={{{cooked hunger|0}}}}}<br>
{{ConditionChange|MoodletName=Boredom|MoodletChange={{{cooked boredom|0}}}}}<br>
{{ConditionChange|MoodletName=Unhappiness|MoodletChange={{{cooked unhappiness|0}}}}}
</small>
{{!}} style="vertical-align:top;" {{!}} <small>
{{#if:{{{burned image|}}}|[[Image:{{{burned image}}}]]}}<br>
{{ConditionChange|MoodletName=Hunger|MoodletChange={{{burned hunger|0}}}}}<br>
{{ConditionChange|MoodletName=Boredom|MoodletChange={{{burned boredom|0}}}}}<br>
{{ConditionChange|MoodletName=Unhappiness|MoodletChange={{{burned unhappiness|0}}}}}<br>
{{ConditionChange|WillMakeSick=1}}
</small>
{{!}}}|}}|}}</includeonly>

Revision as of 13:49, 14 April 2024

Notebook.pngTemplate Documentation

The {{Consumables}} (previously called '''Consumables2''') template is used to add a table to a food item's page. If a property is not included or is 0, it will not be displayed.

Parameters

Table

  • position [left|center|right]

Images

  • image [required]
  • burned image
  • rotten image
  • cooked image

Properties

  • perishable [true|false] (use 1 for true, 0 for false)
  • cookable [true|false] (use 1 for true, 0 for false)

Uncooked

Fresh
  • weight
  • hunger
  • boredom
  • stress
  • unhappiness
Stale

(Unrotten meaning not fresh anymore but not yet rotten

  • unrotten hunger
  • unrotten boredom
  • unrotten stress
  • unrotten unhappiness
Rotten
  • rotten hunger
  • rotten boredom
  • rotten stress
  • rotten unhappiness

Cooked

Fresh
  • cooked weight
  • cooked hunger
  • cooked boredom
  • cooked stress
  • cooked unhappiness
Stale
  • unrottencooked weight
  • unrottencooked hunger
  • unrottencooked boredom
  • unrottencooked stress
  • unrottencooked unhappiness
Rotten
  • rottencooked weight
  • rottencooked hunger
  • rottencooked boredom
  • rottencooked stress
  • rottencooked unhappiness

Burned

Burned
  • burned hunger
  • burned boredom
  • burned unhappiness

Examples

Example 1

Code
{{Consumables
|image = Grapes.png
|hunger = -15
|unrotten hunger = -11
|unrotten boredom = +10
|unrotten unhappiness = +10
|unrotten image = Grapes.png
|rotten hunger = -6
|rotten boredom = +20
|rotten unhappiness = +20
|perishable = 1
|rotten image = GrapesRotten.png
}}
Result
Fresh Stale Rotten

Grapes.png
Hunger: -15


Grapes.png
Hunger: -11
Boredom: +10
Unhappiness: +10

GrapesRotten.png
Hunger: -6
Boredom: +20
Unhappiness: +20
Dangerous, will cause sickness.

Example 2

Code
{{Consumables
|position = center
|image = Chicken.png
|rotten image = Chicken Rotten.png
|cooked image = Chicken Cooked.png
|burned image = Chicken Overdone.png
|perishable = 1
|cookable = 1
|hunger = -35
|dangerous uncooked = 1
|boredom = 0
|unhappiness = 0
|unrotten hunger = -26
|unrotten unhappiness = +10
|unrotten boredom = +10
|rotten hunger = -15
|rotten unhappiness = +20
|rotten boredom = +20
|cooked hunger = -45
|cooked unhappiness = 0
|cooked boredom = 0
|unrottencooked hunger = -26
|unrottencooked unhappiness = +10
|unrottencooked boredom = +10
|rottencooked hunger = -15
rottencooked unhappiness = +20
|rottencooked boredom = +20
|burned hunger = -11
|burned boredom = +20
|burned unhappiness = +20
}}
Result
Fresh Stale Rotten
Uncooked

Chicken.png
Hunger: -35


Dangerous uncooked, may cause sickness.

Chicken.png
Hunger: -26
Boredom: +10
Unhappiness: +10
Dangerous uncooked, may cause sickness.

Chicken Rotten.png

Hunger: -15
Boredom: +20
Unhappiness: +20
Dangerous, will cause sickness.

Cooked

Chicken Cooked.png
Hunger: -45

Chicken Cooked.png
Hunger: -26
Boredom: +10
Unhappiness: +10

Chicken Cooked.png
Hunger: -15
Boredom: +20
Unhappiness: +20
Dangerous, will cause sickness.

Burned

Chicken Overdone.png
Hunger: -11
Boredom: +20
Unhappiness: +20
Dangerous, will cause sickness.

See also

Editors can experiment in this template's sandbox.