Template:ConditionChange: Difference between revisions

From PZwiki
(Creating a sub-template for evaluating a status moodlet's change value and coloring it red or green as appropriate.)
 
(Realized since all moodlets follow the same semantics (a negative value is a positive change) I could greatly simplify the template)
Line 1: Line 1:
<includeonly>
<includeonly>
{{#ifexpr:{{{thirstvalue|0}}}>0|'''Thirst:''' <font style="color:red">{{{thirstvalue}}</font>}}
{{#ifexpr:{{{moodletchange|0}}}>0|'''{{{Moodlet Name}}}:''' <font style="color:red">{{{moodletchange}}}</font>}}
{{#ifexpr:{{{thirstvalue|0}}}<0|'''Thirst:''' <font style="color:green">{{{thirstvalue}}</font>}}
{{#ifexpr:{{{moodletchange|0}}}<0|'''{{{Moodlet Name}}}:''' <font style="color:green">{{{moodletchange}}}</font>}}
{{#ifexpr:{{{hungervalue|0}}}>0|'''Hunger:''' <font style="color:red">{{{hungervalue}}</font>}}
{{#ifexpr:{{{DangerousUncooked|0}}}=1|<font style="color:red">This food is dangerous uncooked and may make you [[Moodles#Sick|sick]].</font>}}
{{#ifexpr:{{{hungervalue|0}}}<0|'''Hunger:''' <font style="color:green">{{{hungervalue}}</font>}}
{{#ifexpr:{{{WillMakeSick|0}}}=1|<font style="color:red">Consuming this will make you [[Moodles#Sick|sick]].</font>}}
{{#ifexpr:{{{boredomvalue|0}}}>0|'''Boredom:''' <font style="color:red">{{{boredomvalue}}</font>}}
{{#ifexpr:{{{boredomvalue|0}}}<0|'''Boredom:''' <font style="color:green">{{{boredomvalue}}</font>}}
{{#ifexpr:{{{unhappinessvalue|0}}}>0|'''Unhappiness:''' <font style="color:red">{{{unhappinessvalue}}</font>}}
{{#ifexpr:{{{unhappinessvalue|0}}}<0|'''Unhappiness:''' <font style="color:green">{{{unhappinessvalue}}</font>}}
{{#ifexpr:{{{stressvalue|0}}}>0|'''Stress:''' <font style="color:red">{{{stressvalue}}</font>}}
{{#ifexpr:{{{stressvalue|0}}}<0|'''Stress:''' <font style="color:green">{{{stressvalue}}</font>}}
{{#ifexpr:{{{fatiguevalue|0}}}>0|'''Fatigue:''' <font style="color:red">{{{fatiguevalue}}</font>}}
{{#ifexpr:{{{fatiguevalue|0}}}<0|'''Fatigue:''' <font style="color:green">{{{fatiguevalue}}</font>}}
</includeonly>
</includeonly>



Revision as of 01:45, 10 December 2013


[view] [edit] [history] [purge] Template documentation
This template doesn't have any documentation yet! Help out by writing some.
Documentation transcluded from Template:ConditionChange/doc.
Editors can experiment in this template's sandbox (create)