User:The Gaffer/Sandbox/RecipeCard: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
The Gaffer (talk | contribs) No edit summary |
The Gaffer (talk | contribs) No edit summary Tag: Manual revert |
||
Line 1: | Line 1: | ||
<includeonly><!-- |
<includeonly><!-- |
||
Setting up variables for materials and their costs |
|||
-->{{#if:{{{rawmat1|}}}|{{#set:RawMaterial1={{{rawmat1}}}}}}}<!-- |
-->{{#if:{{{rawmat1|}}}|{{#set:RawMaterial1={{{rawmat1}}}}}}}<!-- |
||
-->{{#if:{{{rawmat2|}}}|{{#set:RawMaterial2={{{rawmat2}}}}}}}<!-- |
-->{{#if:{{{rawmat2|}}}|{{#set:RawMaterial2={{{rawmat2}}}}}}}<!-- |
||
Line 7: | Line 6: | ||
-->{{#vardefine:rawmat2cost|{{#if:{{{rawmat2|}}}|{{formatnum:{{#ask:[[Sold item::{{{rawmat2}}}]]|?Shop buy price=|mainlabel=-|searchlabel=|limit=1|sort=Shop buy price|order=asc}}|R}}|0}}}}<!-- |
-->{{#vardefine:rawmat2cost|{{#if:{{{rawmat2|}}}|{{formatnum:{{#ask:[[Sold item::{{{rawmat2}}}]]|?Shop buy price=|mainlabel=-|searchlabel=|limit=1|sort=Shop buy price|order=asc}}|R}}|0}}}}<!-- |
||
-->{{#vardefine:rawmat3cost|{{#if:{{{rawmat3|}}}|{{formatnum:{{#ask:[[Sold item::{{{rawmat3}}}]]|?Shop buy price=|mainlabel=-|searchlabel=|limit=1|sort=Shop buy price|order=asc}}|R}}|0}}}}<!-- |
-->{{#vardefine:rawmat3cost|{{#if:{{{rawmat3|}}}|{{formatnum:{{#ask:[[Sold item::{{{rawmat3}}}]]|?Shop buy price=|mainlabel=-|searchlabel=|limit=1|sort=Shop buy price|order=asc}}|R}}|0}}}}<!-- |
||
-->{{#vardefine:rawmat2total|0}}<!-- |
|||
⚫ | |||
-->{{#vardefine:rawmat3total|0}}<!-- |
|||
--> |
|||
⚫ | |||
{| class="wikitable" |
{| class="wikitable" |
||
! colspan="4" | Requirements |
! colspan="4" | Requirements |
||
Line 47: | Line 47: | ||
}} |
}} |
||
! colspan="3" | Total Raw cost |
! colspan="3" | Total Raw cost |
||
| style="text-align: right;" {{!}} {{Currency|{{# |
| style="text-align: right;" {{!}} {{Currency|{{#vardefineecho:totalcost|{{#expr:{{#varexists:rawmat1total|{{#var:rawmat1total}}|0}} + {{#varexists:rawmat2total|{{#var:rawmat2total}}|0}} + {{#varexists:rawmat3total|{{#var:rawmat3total}}|0}}}}}}}} |
||
|- |
|- |
||
{{#if:{{{preparedmat1|}}}| |
{{#if:{{{preparedmat1|}}}| |