Template:ConditionChange: Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
{{#ifexpr:{{{MoodletChange}}}>0|'''{{{MoodletName}}}:''' <font style="color:red">{{{MoodletChange}}}<BR /></font>|}} | {{#ifexpr:{{{MoodletChange}}}>0|'''{{{MoodletName}}}:''' <font style="color:red">{{{MoodletChange}}}<BR /></font>|}} | ||
{{#ifexpr:{{{MoodletChange}}}<0|'''{{{MoodletName}}}:''' <font style="color:green">{{{MoodletChange}}}</font><BR />|}} | {{#ifexpr:{{{MoodletChange}}}<0|'''{{{MoodletName}}}:''' <font style="color:green">{{{MoodletChange}}}</font><BR />|}} | ||
{{#ifexpr:{{{DangerousUncooked | {{#ifexpr:1{{{DangerousUncooked}}}=11|<font style="color:red">This food is dangerous uncooked and may make you [[Moodles#Sick|sick]].</font><BR />|}} | ||
{{#ifexpr:{{{WillMakeSick | {{#ifexpr:1{{{WillMakeSick}}}=11|<font style="color:red">Consuming this will make you [[Moodles#Sick|sick]].</font><BR />|}}</includeonly> | ||
<noinclude> | <noinclude> | ||
{{documentation}} | {{documentation}} | ||
[[category:templates]] | [[category:templates]] | ||
</noinclude> | </noinclude> |
Revision as of 03:35, 10 December 2013
Description
It currently has three functions:
- It is designed to evaluate the value of changes to status moodlets and color the value red or green as appropriate.
- It will display warning text if a food is dangerous to eat.
- It will display warning text if a food is dangerous to eat only when uncooked.
It takes the following input variables:
- MoodletName: An arbitrary text string which will be repeated back verbatim as italicized text.
- MoodletChange: A signed integer value that is evaluated and colored green if a negative number, and red if a positive integer.
- DangerousUncooked: A binary true/false value that if true will display warning text.
- WillMakeSick: A binary true/false value that if true will display warning text.
Examples
Status moodlet changes
Syntax | Produces |
---|---|
|
Thirst: +15 Expression error: Unrecognized punctuation character "{". Expression error: Unrecognized punctuation character "{". |
|
OopsIMadeATypo: -15 |
Status moodlet warnings
Syntax | Produces |
---|---|
|
Expression error: Unrecognized punctuation character "{".
Expression error: Unrecognized punctuation character "{".
This food is dangerous uncooked and may make you sick. |
|
Expression error: Unrecognized punctuation character "{".
Expression error: Unrecognized punctuation character "{".
Expression error: Unrecognized punctuation character "{".
Consuming this will make you sick. |
Editors can experiment in this template's sandbox (create)