Template:AdjustReagent: Difference between revisions

From Space Station 14 Wiki
(cat)
Tag: Manual revert
(docs)
Line 1: Line 1:
{{Chance to|{{#ifexpr:{{{amount|0}}}<0
<includeonly>{{Chance to|{{#ifexpr:{{{amount|0}}}<0
|{{#ifeq:{{{prob}}}|1|Removes|remove}} {{#expr:abs {{{amount|0}}}}} {{#invoke:Chemistry Lookup|readscalar|{{{reagent}}}|name}}
|{{#ifeq:{{{prob}}}|1|Removes|remove}} {{#expr:abs {{{amount|0}}}}} {{#invoke:Chemistry Lookup|readscalar|{{{reagent}}}|name}}
|{{#ifeq:{{{prob}}}|1|Adds|add}} {{#expr:abs {{{amount|0}}}}} {{#invoke:Chemistry Lookup|readscalar|{{{reagent}}}|name}}
|{{#ifeq:{{{prob}}}|1|Adds|add}} {{#expr:abs {{{amount|0}}}}} {{#invoke:Chemistry Lookup|readscalar|{{{reagent}}}|name}}
}}{{#if:{{{when|}}}|&#x20;when {{{when}}}}}.|prob={{{prob}}}}}
}}{{#if:{{{when|}}}|&#x20;when {{{when}}}}}.|prob={{{prob}}}}}</includeonly><noinclude>
{{documentation}}
 
[[Category:Templates without specific category]]
[[Category:Templates without documentation pages]]
</noinclude>

Revision as of 14:38, 24 June 2024

Template documentation
view or edit this documentation about template documentation

  • {{AdjustReagent|amount=4|prob=0.1|reagent=Histamine|when=more than 1u lexorin present}}

10% chance to add 4 histamine when more than 1u lexorin present.

  • {{AdjustReagent|amount=-1|prob=0.5|reagent=GrapeSoda|when=slipping on a floor}}

50% chance to remove 1 grape soda when slipping on a floor.