Template:Chef/RecipeRow: Difference between revisions

Dynamic material cost and profit calculation
(Blank cells if cost is not given)
(Dynamic material cost and profit calculation)
Line 4:
-->{{#vardefine:RawMaterial1|{{#if:{{{Item|}}}|{{#ask:[[{{{Item}}}]]|?RawMaterial1=|mainlabel=-}}|R}}|0}}<!--
-->{{#vardefine:RawMaterial2|{{#if:{{{Item|}}}|{{#ask:[[{{{Item}}}]]|?RawMaterial2=|mainlabel=-}}|R}}|0}}<!--
-->{{#vardefine:RawMaterial3|{{#if:{{{Item|}}}|{{#ask:[[{{{Item}}}]]|?RawMaterial3=|mainlabel=-}}|R}}|0}}<!--
-->{{#vardefine:RawMaterialTotalCost|{{#if:{{{Item|}}}|{{formatnum:{{#ask:[[{{{Item}}}]]|?RawMaterialTotalCost=|mainlabel=-}}|R}}|0}}}}
| {{{Level}}}
| {{Plinkt|{{{Item}}}}}
Line 12 ⟶ 13:
| {{{ExperienceFirstTime}}}
| {{{ExperiencePerHour}}}
| {{#if:{{{Cost|}#var:RawMaterialTotalCost}}|{{Currency|{{{Cost}#var:RawMaterialTotalCost}}}}<noinclude>|{{{Cost}}}</noinclude>}}
| {{Currency|{{#var:SellValue}}}}
| {{#if:{{{Cost|}#var:RawMaterialTotalCost}}|{{Currency|{{#expr:{{#var:SellValue}} - {{{Cost}#var:RawMaterialTotalCost}}}}}}}}
| {{#if:{{#var:RawMaterialTotalCost}}|{Cost{#if:{{{Experience|}}}|{{Currency|{{#expr:({{#var:SellValue}} - {{{Cost}#var:RawMaterialTotalCost}})/(200*{{{Experience}}}) round 2}}}}}}}}
| {{{ProfitPerHour}}}</onlyinclude>
|}
303

edits