Editing User:The Gaffer/Sandbox/RecipeCard
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
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 6: | Line 7: | ||
-->{{#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}}<!-- |
|||
-->{{#vardefine:output1cost|{{#if:{{{output1|}}}|{{formatnum:{{#ask:[[{{{output1}}}]]|?Value=|mainlabel=-}}|R}}|0}}}} |
-->{{#vardefine:output1cost|{{#if:{{{output1|}}}|{{formatnum:{{#ask:[[{{{output1}}}]]|?Value=|mainlabel=-}}|R}}|0}}}} |
||
{| class="wikitable" |
{| class="wikitable" |
||
Line 91: | Line 90: | ||
|}<!-- |
|}<!-- |
||
-->{{#set:RawMaterialTotalCost={{formatnum:{{#var:totalcost}}}}}}<!-- |
-->{{#set:RawMaterialTotalCost={{formatnum:{{#var:totalcost}}}}}}<!-- |
||
⚫ | |||
--> |
|||
{{#if:{{{rawmat1|}}}| |
|||
{{#subobject:Uses Material |
|||
| Name = {{{rawmat1}}} |
|||
| Uses Quantity = {{{rawmat1qty|1}}} |
|||
| Cost = {{#var:rawmat1total}} |
|||
| Used in = {{FULLPAGENAME}} |
|||
}} |
|||
}}<!-- |
|||
-->{{#if:{{{rawmat2|}}}| |
|||
{{#subobject:Uses Material |
|||
| Name = {{{rawmat2}}} |
|||
| Uses Quantity = {{{rawmat2qty|1}}} |
|||
| Cost = {{#var:rawmat2total}} |
|||
| Used in = {{FULLPAGENAME}} |
|||
}} |
|||
}}<!-- |
|||
-->{{#if:{{{rawmat3|}}}| |
|||
{{#subobject:Uses Material |
|||
| Name = {{{rawmat3}}} |
|||
| Uses Quantity = {{{rawmat3qty|1}}} |
|||
| Cost = {{#var:rawmat3total}} |
|||
| Used in = {{FULLPAGENAME}} |
|||
}} |
|||
}} |
|||
⚫ |